For Programmers: Free Programming Magazines  


Home > Archive > Java Help > September 2004 > Help needed on java.lang.NoClassDefFoundError









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Help needed on java.lang.NoClassDefFoundError
Abhijit Gadekar

2004-09-30, 11:37 am

Hi all,
I have added my classes to a project.I am using JBuilder.On
compilation I do not get any errors for the classes I have added.But
when I run the project I get java.lang.NoClassDefFoundError for the
classes I have
added.I tried setting the environment variable CLASS_PATH for that
specific class.But it did not work.Please let me know if you know
anything about this.

Regards,
Abhijit.
Stefan Schulz

2004-09-30, 11:37 am

On 30 Sep 2004 06:44:20 -0700, Abhijit Gadekar <abhijitgadekar@yahoo.com>
wrote:

> Hi all,
> I have added my classes to a project.I am using JBuilder.On
> compilation I do not get any errors for the classes I have added.But
> when I run the project I get java.lang.NoClassDefFoundError for the
> classes I have
> added.I tried setting the environment variable CLASS_PATH for that
> specific class.But it did not work.Please let me know if you know
> anything about this.



While i can only guess what you actually mean, i guess you have a problem
with your CLASSPATH (no underscore). Set it to the directory that contains
the root of your package tree (if your class my.package.MyClass is saved as
C:\somedir\my\package\MyClass.class, set CLASSPATH to C:\somedir\).

Also, NoClassDefFoundError's are often thrown if you try to run a java
program
and type java MainType.class instead of java MainType.

--

Whom the gods wish to destroy they first call promising.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com