I am a Java beginner. I am running XP and have
downloaded J2SE SDK from the SUN web site.
The SDK is installed directly under my C-drive,
It looks like:
C:\j2sdk1.4.2_10 with subdirectories
bin (containing java.exe) and lib (containing tools.jar).
I have included C:\j2sdk1.4.2_10\bin in the Path. I have
also created Classpath = C:\j2sdk1.4.2_10\bin.
I am now able to compile text files (.java) to .class files
using the command line (DOS window).
I have a very simple program called Hello and I keep Hello.java
and Hello.class in C:\Workspace.
However, when I try to run the .class file I get:
C:\Workspace>java Hello (return)
Exception in thread "main" java.lang.NoClassDefFoundError: Hello
I dont think there is anything wrong with the code in 'Hello' because
I have tried tried other demo .class files and I get the same error.
Anyone any idea what I could do about this? (I want to get down
to writing code!).