Loading audio file from jar

The question is simple : it is possible to read an audio file inside a jar file ?There's someone who did it before ?
[131 byte] By [jadeita] at [2007-10-2 0:43:16]
# 1
Yes it is:URL tmpURL = getClass().getResource(currentFileName);Player player = Manager.createPlayer(tmpURL);Where "currentFileName" is the filename of the audio clip. Does not work for video.
n_martina at 2007-7-15 16:57:58 > top of Java-index,Security,Cryptography...
# 2
The example above is from a Java Webstart application. The following can also be used to generate a valid URL. URL tmpURL = new URL("jar: http://www.test.com/myJar.jar!/tada.wav");
n_martina at 2007-7-15 16:57:58 > top of Java-index,Security,Cryptography...
# 3

Thank you for your answer, however it seems not working as i got the error 'cannot find a player for ...' .

Maybe i made some mistakes, but i tried in many way without results.

However i found another way to play sound file stored in a jar file.

Using your advice and the javax.sound.sampled package.

This is a snippet of code if anyone is interested :

URL tmpURL = getClass().getResource(fileName);

AudioInputStream audioStream = AudioSystem.getAudioInputStream(tmpURL);

Clip clip = AudioSystem.getClip();

clip.open(audioStream);

clip.start();

jadeita at 2007-7-15 16:57:58 > top of Java-index,Security,Cryptography...