Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
807599Dec 14 2006 — edited Apr 17 2008I have just installed jdk 6 but keep getting the exception error.
My program is simple:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
} // end of class HelloWorld
When I type c:\javac HelloWorld.class, the class is created successfully. But, then I type c:\java HelloWorld, the exception error occur. I have set the classpath as below but exception remain the same.
C:\Program Files\Java\jdk1.6.0\bin;%CLASSPATH%;C:\Program Files\QuickTime\QTSystem\QTJava.zip
Please help. What is wrong?