我試圖啓動我的我的代碼,並開始播放。但我不能那樣做。我不能啓動播放器在我的代碼
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