aspose file tools*
The moose likes Beginning Java and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic
Author

NoClassDefFoundError

Scott Ronan
Greenhorn

Joined: Jul 12, 2001
Posts: 3
hey,
I am just starting to use Java after a long time. I had a harddrive that went bad, and had to install Java again. The problem is my programs will ont compile after I installed Java again.
I get the error:
"java.lang.NoClassDefFoundError: sun/tools/javac/Main
Exception in thread "main" Process completed with exit code 1"
I think that it has to do with the install.
I had some problems a while back with 1.3 version and 1.2 version conflecting. I don't know if this is part of the problem or not. Please help! I need to get started soon. I also can't find any help files to explain errors. Where can I get them. Thanks!
Scott
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
What is your classpath and where are you keeping your compiled classes?


"JavaRanch, where the deer and the Certified play" - David O'Meara
Scott Ronan
Greenhorn

Joined: Jul 12, 2001
Posts: 3
Hey,
Thanks for the reply. Here is my class path:
SET COBDIR=C:\MFCOBOL
SET COBHNF=C:\MFCOBOL
@C:\PROGRA~1\NORTON~1\NAVDX.EXE /Startup
@ECHO OFF
SET BLASTER=A220 I7 D1 H7 P330 T6
SET SBPCI=C:\SBPCI
PROMPT $P$G
PATH=C:\MFCOBOL;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\CDROM;C:\BRCD\BIN;C:\BRCD\COMMAND;C:\CoreJavaBook
SET PATH=C:\JDK1.2\BIN;%PATH%
I am keeping my compiled files{Programs that I have written and compiled} in different directories. If I try to compile a Java file I get the error.
Thanks.
Scott
dhaliwal
Greenhorn

Joined: Jul 14, 2001
Posts: 1
Hi,
Your set path should look something like this:
SET PATH=%PATH%;c:\jdk1.3.1\bin;
Make sure that the jdk directory is correct.
As for your classpath:
set classpath=%classpath%;.;C:\co309
note: co309 is where all my java programs are stored.

Terence Doyle
Ranch Hand

Joined: May 30, 2001
Posts: 328
Hi,
All you really need is a 'dot' in your path, as well as the java bin directory:
SET PATH=C:\JDK1.3\BIN;.;
This allows you to execute the java, javac, etc commands in any directory in your system.

Bye,
Terry


Raising Flares debut album 'Ignition' out now

http://www.raisingflares.com

Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Scott Ronan
Greenhorn

Joined: Jul 12, 2001
Posts: 3
Hey,
Thanks for the help I will try it as soon as I can. I hope it works....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoClassDefFoundError
 
Similar Threads
Java Plugin registry error
Question about Text pad. Hope some one can answer it
Problem with Tomcat Run As Administrator.
Something is wrong with my Java on LInux...
Corrupt Netbeans Please Help