How to load media resources from the classpath in JMF
问题 So, I have a Java application that I want to turn into an executable jar. I am using JMF in this application, and I can't seem to get the sound files working right... I create the jar using jar cvfm jarname.jar manifest.txt *.class *.gif *.wav So, all the sound files get put inside the jar, and in the code, I am creating the Players using Player player = Manager.createPlayer(ClassName.class.getResource("song1.wav")); The jar is on my desktop, and when I attempt to run it, this exception