Compiles but java.lang.NoClassDefFoundError when I try to run it
When I compile my code, I do this :
Code:
C:\Program Files\Java\jdk1.5.0\bin>javac c:\java\hello.java
But when I go to run the class file I get the following error :
Code:
C:\Program Files\Java\jdk1.5.0\bin>java c:\java\hello
Exception in thread "main" java.lang.NoClassDefFoundError: c:\java\hello
The code I have made (very advanced :D ):
Code:
class Hello {
public static void main(String [] args) {
System.out.println("Hello world");
}
}
Any ideas?
Thanks :)