Original Post
I recently got the Java SDK installed and I found a tutorial on the net about creating your first program. I put the code in notepad, saved it as MyProgram.java and ran javac. It created a class file, but when I try to compile that with java it gives me the following error:
Exception in thread "main"java.lang.NoClassDefFoundError: MyProgram
I have no idea what that means. Is it my source code thats causing the problem, or did I mess up when installing the SDK. Heres my source code. I dont understand it all right now, so any help is appreciated.
public class MyProgram {
public static void main(String[] args) {
System.out.println(
"Hello World.");
}
}