*
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 Murach's Java Servlets and JSP this week in the Servlets 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/
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ClassNotFoundException Vs NoClassDefFoundError
 
Similar Threads
NoClassDefFoundError
NoClassDefFoundError
java.lang. NoClassDefFoundError
NoClassDefFoundError and NoClassDefFoundException
NoClassDefFoundError