This content has been marked as final. Show 2 replies
You should really factor this into several smaller problems. First figure out how to build a jar file using ANT or the jar utility, don't use Eclipse for distribution, it will perform magic that you may never actually understand.
Once you have the jar file built, determine where you really want the wav files to be, in the jar, or in a place the user can write to outside the jar. Then provide a way to configure that at run time.
Aye, found some new gusto, and dove into the jar making business again.
Got the problem reduced to a difference in classpath indications.
The program now works, sound and all, with: "java -cp .;MyJar.jar;D:/.../jmf.jar myPackage.MainClass"
But a problem still occurs when I try to set the Class-Path in the manifest file.
First of all, when trying any combination of the parts of the above classpath declaration seperated by spaces ("Class-Path: *+.+* *+MyJar.jar+* D:/.../jmf.jar", I've tried it with those in bold-italics and without), I get NoClassDefFoundError when I try to run it. ("java -jar MyJar.jar").
If I set Class-Path to the same literal text (".;MyJar.jar;D:/.../jmf.jar"), the program runs, but during runtime I get another error:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/media/Manager
Already glad I got it to run SOME way, but would really like to extend my knowledge by knowing what is causing these last errors and how I should phrase my Class-Path declaration in the manifest file.