package co.dc.matrixcode;
import java.io.File;
import java.io.FileInputStream;
import javazoom.jl.player.Player;
public class Demo {
public static void main(String[] args) {
try {
File audioFile = new File(Demo.class.getResource("/co/dc/matrixcode/dui.mp3").getPath());
Player pp = new javazoom.jl.player.Player(new FileInputStream(audioFile));
pp.play();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
需要引入一个包:jl1.0.1.jar--百度搜索