我试图启动我的我的代码,并开始播放。但我不能那样做。我不能启动播放器在我的代码
import javax.media.*;
import java.io.*;
public class MP3Player {
public static void main(String[] args) throws Exception {
File file = new File("c://player/trigger.mpg");
MediaLocator mrl = new MediaLocator(file.toURL());
Player player = Manager.createPlayer(mrl);
player.start();
}
}
[由菲利普编辑] 据原作者注释,Netbeans的打印以下错误消息:
Unable to handle format: MPEG, 160x120, FrameRate=30.0, Length=28800 Failed to realize:
[email protected] Error: Unable to realize
[email protected] BUILD SUCCESSFUL (total time: 1 second)
[由菲利普/编辑]
扩展是缺少/路径中一个错字? –
“不能这样做”=?你有错误吗?你的电脑爆炸了吗? –
我收到了来自Netbeans的此消息 – Alex