JCreator can't compile my code.

C

cntcltk

I just installed JCreator and I also downloaded jdk1.5.0_07
When I compile my codes in JCreator,it keeps coming up with this error:

Exception in thread "main" java.lang.NoClassDefFoundError: NScript
Press any key to continue...

I can go manually into Dos-mode and run it with SDK's java.I use these
command:
javac NScript.java
java NScript
and It works.

But how can I compile my code in JCreator?
Can some one help me? why this doesn't work in JCreator but it works at
the command line?
Thanks!

PS:
this is my classpass in my pc:

C:\Documents and Settings\Administrator>path
PATH=D:\Tcl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;d:\mgl\bin\win32;D:\Java\jdk1.5.0_07\bin;.;D:\Java\jdk1.5.0_07\lib

C:\Documents and Settings\Administrator>set classpath
CLASSPATH=.;D:\Java\jdk1.5.0_07\lib\dt.jar;D:\Java\jdk1.5.0_07\lib\tools.jar;D:\
Java\jdk1.5.0_07\jre\lib\rt.jar
 
L

Lee Weiner

I just installed JCreator and I also downloaded jdk1.5.0_07
When I compile my codes in JCreator,it keeps coming up with this error:

Exception in thread "main" java.lang.NoClassDefFoundError: NScript
Press any key to continue...

I can go manually into Dos-mode and run it with SDK's java.I use these
command:
javac NScript.java
java NScript
and It works.

But how can I compile my code in JCreator?
Can some one help me? why this doesn't work in JCreator but it works at
the command line?

If you installed the JDK before you installed JCreator, it would have found
the JDK the first time you ran JCreator and built a JDK profile for it. If,
OTOH, you installed JCreator first, there was no JDK for it to find and you
have to build a JDK profile manually. In JCreator, go to Configure | Options
and select "JDK Profiles". If you don't see any profiles in the listbox,
click the "New" button and navigate to the JDK home directory, probably
"C:\Program Files\Java\jdk1.5.0_07". Click OK and you should be home free.
BTW, JCreator doesn't use a ClassPath setting. It executes everything with
fully qualified paths using the JDK profile.

Lee Weiner
lee AT leeweiner DOT org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top