• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

NoClassDefFoundError

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,
Thanks for the help I will try it as soon as I can. I hope it works....
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic