• Dear Guest, Please do NOT forget to join our JAVA JOBS (ONLY) FACEBOOK GROUP to be aware of latest JAVA openings, and you may also post any JAVA related queries/jobs.

What is ClassNotFoundException ?

#1
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.
e.g Class.forName("java.lang.String");
 
#2
The ClassNotFoundException is tossed when the Java Virtual Machine (JVM) tries to stack a specific class and the predetermined class can't be found in the classpath. The ClassNotFoundException is a checked exemption and in this manner, must be announced in a strategy or constructor's tosses condition.
 
Top