This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ClassNotFoundException Vs NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "ClassNotFoundException Vs NoClassDefFoundError" Watch "ClassNotFoundException Vs NoClassDefFoundError" New topic
Author

ClassNotFoundException Vs NoClassDefFoundError

Saibabaa Pragada
Ranch Hand

Joined: Oct 24, 2010
Posts: 162
Hi, What is the difference between ClassNotFoundException(Checked Exception) and NoClassDefFoundError(Error)..I am not able to figure out from API
Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

The ClassNotFoundException throws when trying to load a class using reflection, but is not found on the class path. The NoClassDefFoundError throws when the class could not be loaded due to some inconsistencies. Missing JAR files or incompatible classes are most common examples.


http://muhammadkhojaye.blogspot.com/
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ClassNotFoundException Vs NoClassDefFoundError
 
Similar Threads
NoClassDefFoundError
NoClassDefFoundError
NoClassDefFoundError
java.lang. NoClassDefFoundError
NoClassDefFoundError and NoClassDefFoundException