I have JCreator installed on my PC, and i use it to develop Java apps.
Recently, I tried to run my program from the command line.
I copied all the java files for my classes to the root directory, and type:
javac MainScreen.java
it compiles fine, no errors
then, i type:
java MainScreen.java
and I get:
Exception in thread "main" java.lang.NoClassDefFoundError: MainScreen/java
Now, I know that CLASSPATH has to be setup properly, but I believe mine is:
CLASSPATH="C:\Program Files\Java j2sdk1.4.1_01\bin";.
If i copy all the files into the jcreator directory, and compile/run them there, everything works fine, no errors.
Anyone know why the program only runs in one folder, even when CLASSPATH is setup properly?
Recently, I tried to run my program from the command line.
I copied all the java files for my classes to the root directory, and type:
javac MainScreen.java
it compiles fine, no errors
then, i type:
java MainScreen.java
and I get:
Exception in thread "main" java.lang.NoClassDefFoundError: MainScreen/java
Now, I know that CLASSPATH has to be setup properly, but I believe mine is:
CLASSPATH="C:\Program Files\Java j2sdk1.4.1_01\bin";.
If i copy all the files into the jcreator directory, and compile/run them there, everything works fine, no errors.
Anyone know why the program only runs in one folder, even when CLASSPATH is setup properly?