Okay so I already followed the Java tutorial for creating a JAR file and even creating the Manifest.txt that goes along with it. I am highly confused and I got to the point where I was running the JAR in the command prompt but it wasn't referring to the other class I was using in my main program.
I have two .class files that I am using, javagame.class and sound.class.
It was finally loading the main class but when it needed to refer to the sound.class file it was saying that it doesn't exist, a NoClassDefFoundError
I did 'jar cfm myjar.jar Manifest.txt javagame.class sound.class' in the cmd prompt then
jar cfe app.jar javagame javagame.class
Finally I did java -jar app.jar to run the JAR and I got the error above where it couldn't find the sound.class file.
Somebody please help I'm highly confused.



classes are not in the same loaction (or folder). Take a look at my answer... it's much easier.public static void main(String args[])method? It must have one or else it won't work.