用这个简易的MP3播放代码,本地播放没问题,但是部署到linux后就无法播放,请问这是什么原因?路径是服务器上的绝对路径public void testname() throws Exception {}private String filename;private Player player;public MP3Player(String filename) {this.filename = filename;}public void play() {try {BufferedInputStream buffer = new BufferedInputStream(new FileInputStream(filename));player = new Player(buffer);player.play();} catch (Exception e) {System.out.println(e);}}public static void main(String[] args) {String urlString = "callout/059187517113N18618216211C20180528164749751B906101033211A.mp3";MP3Player mp3 = new MP3Player(urlString);mp3.play();}
- 1 回答
- 0 关注
- 675 浏览
添加回答
举报
0/150
提交
取消