When ClassNotFoundException will be invoked in Java ?

When JVM tries to load a class by its string name, and couldn’t able to find the class classNotFoundException will be thrown. So as per the Java doc classNotFoundException  will  thrown when an application tries to load in a class through its string name using:
  • The forName method in class Class.
  • The findSystemClass method in class ClassLoader .
  • The loadClass method in class ClassLoader.
but no definition for the class with the specified name could be found.


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email