• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ClassNotFoundException Vs NoClassDefFoundError

 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 449
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic