Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

Error :java.lang.classdefnotfound:

Thread view: 
pandit - 21 Dec 2007 06:21 GMT
Hello,
i m newbie in this group and in java.
i m using jdk1.6 compiler. on my Laptop
But still i m facing a problem
when i m Compiling the Program
the program complied with no error's but at Run time it generate

Error: 'java.lang.classdefnotfound"

i dont understand whts happen this happens with all the

programs

The Process is

first set path

"C:\ path= c:\jdk1.6\bin "

Compile Program

C:\javac first.java  // programm complied with no errors

Run it
C:\java first  // now this times it shows Error

"Java.lang.classdefnotfound"

if enyone knows about it please tell me wht to do

Thanks in advance
Roedy Green - 24 Dec 2007 09:07 GMT
>classdefnotfound

you mean NoClassDefFoundError, the mother of all errors, ruiner of
families, destroyer of worlds, the many headed error message with
numberless possible causes.

I vowed to enumerate the first 37 causes.

see
http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR

(rigth next to the picture of The Scream)

If it turns out the cause is not listed, make a noise and I'll see if
I can find #38 to add to the list.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

EJP - 30 Dec 2007 06:02 GMT
> If it turns out the cause is not listed, make a noise and I'll see if
> I can find #38 to add to the list.

The most common cause of this exception is that the location in the file
system or JAR file doesn't correspond with the package name in the
.class file. IOW a .class file was found via the CLASSPATH but it didn't
contain the expected class. This can also happen if you just rename the
.class file.
Sean - 24 Dec 2007 09:12 GMT
> Error: 'java.lang.classdefnotfound"

Give us some code to work with.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.