Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
Scott Ronan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your classpath and where are you keeping your compiled classes?
 
Scott Ronan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Scott Ronan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
Thanks for the help I will try it as soon as I can. I hope it works....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic