I have an swing app. Where I use wav file to make alarm. I put Alarm.wav in folder where I have *.class is bin folder. And it works. I use this code to get wav file and play it.
InputStream in;
try {
InputStream is = getClass().getResourceAsStream("Alarm.wav");
AudioInputStream audioInputStream = AudioSystem
.getAudioInputStream(is);
AudioPlayer.player.start(audioInputStream);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
But when I made in Eclipse runnable jar there is no sound in my app.