Thursday, February 11, 2016

Difference Between ClassNotFoundException Vs NoClassDefFoundError In Java

ClassNotFoundException In Java :
ClassNotFoundException is thrown when using reflection to look up a class, such like Class.forName() or loadClass() or findSystemClass() methods and the class with specified name are not found in the classpath.

NoClassDefFoundError In Java :
NoClassDefFoundError is an error which is thrown when Java Runtime System tries to load the definition of a class and class definition is no longer available. The required class definition was present at compile time but it was missing at run time.

No comments:

Post a Comment