想知道如何在我的jar中使用我的.wav文件使用庫光滑。目前這裏是我的代碼,我不想將其更改爲不同的庫。主要是因爲我內部有很多有用的光滑「空洞」。這裏的代碼到目前爲止...如何在Java中使用WAV播放WAV時,使用光滑方式將WAV包含在JAR中
public class AudioPlayer {
public static Map<String, Music> musicMap = new HashMap<String, Music>();
public static void load() throws SlickException{
musicMap.put("music", new Music(THIS IS WHERE THE STREAM/RESOURCES CODE WOULD GO));
}
public static Music getMusic(String key) {
return musicMap.get(key);
}
}
可能重複的[加載文件在jar](http://stackoverflow.com/questions/4548699/load-file-within-a-jar) – shmosel