Possible Duplicate:
.jar file keeps giving me “ could not find the main class”. Program will exit
Trying to run a basic "hello World" program. I have followed step by step tutorials and i get the same error message each time:
java.lang.NoClassDefFoundError: HelloWorld
Caused by: java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"
Here is the Program:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Has anyone had this same issue and know how to resolve it?