It's not a secret anymore!
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic


Anuja Navare

Joined: May 13, 2001
Posts: 6
I am getting NoClassDefFoundError whilr running the program. I am able to compile it without an error. I am using jdk 1.2.2 version. I have added the folder where my file is - in the classpath. Also I have jdk1.2.2 foler & jdk1.2.2\jre\lib\rt.jar in the classpath.
can anybody help me??
Thanks vety much!
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Compiling only requires that the path parameter be correct. Your error looks like the classpath is not correct.
What class is not found?
Where does that class currently sit?
What is your classpath?
What directory were you in when you executed the app?
The classes must sit in a directory named in the classpath.
If you put a dot reference in the classpath then the "current" directory (the one that you are sitting in when you call java) will be included.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Anuja Navare

Joined: May 13, 2001
Posts: 6
Got it. Thank you very much!
I agree. Here's the link:
subject: NoClassDefFoundError
jQuery in Action, 3rd edition