我将如何设置以下代码的目录以在所选包内播放 mp3 文件?
FileInputStream fis = new FileInputStream("song.mp3");
还有一个简单的问题:我将如何为以下代码添加暂停按钮?
try {
FileInputStream fis = new FileInputStream("song.mp3");
Player playMP3 = new Player(fis);
playMP3.play();
} catch (Exception exc) {
exc.printStackTrace();
System.out.println("Failed to play the file.");
}