Why do I get a NoClassDefFoundError when I try to run my HelloWorld app?
The problem is probably that your HelloWorld.class file is not on your class path. The class path is the list of one or more directories in which the java application launcher will look for the .class files comprising your application. So, how to specify the class path? If your program depends only on the J2SE classes, you should not need to use classpath, because those classes are automatically on the classpath. If your program depends on other classes, you need to set classpath to those classes. In that case, it is preferable to use the -classpath option rather than the CLASSPATH environment variable, as the -classpath option enables each application to have its own classpath.
Related Questions
- The game installed OK, but when I try to run the game I get an error that reads "General Protection Fault: History: Init_Engine" And then the launcher quits. Whats wrong?
- When I try to run the GIA on a Windows 95 machine, I receive the error "Pure Virtual Function called."?
- Why do I get a NoClassDefFoundError when I try to run my HelloWorld app?