Package java.lang
Class ClassNotFoundException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.ReflectiveOperationException
-
- java.lang.ClassNotFoundException
-
- All Implemented Interfaces:
Serializable
public class ClassNotFoundException extends ReflectiveOperationException
Thrown when a class loader is unable to find a class.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassNotFoundException()Constructs a newClassNotFoundExceptionthat includes the current stack trace.ClassNotFoundException(String detailMessage)Constructs a newClassNotFoundExceptionwith the current stack trace and the specified detail message.ClassNotFoundException(String detailMessage, Throwable exception)Constructs a newClassNotFoundExceptionwith the current stack trace, the specified detail message and the exception that occurred when loading the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowablegetCause()Returns the cause of this Throwable, ornullif there is no cause.ThrowablegetException()Returns the exception which occurred when loading the class.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ClassNotFoundException
public ClassNotFoundException()
Constructs a newClassNotFoundExceptionthat includes the current stack trace.
-
ClassNotFoundException
public ClassNotFoundException(String detailMessage)
Constructs a newClassNotFoundExceptionwith the current stack trace and the specified detail message.- Parameters:
detailMessage- the detail message for this exception.
-
ClassNotFoundException
public ClassNotFoundException(String detailMessage, Throwable exception)
Constructs a newClassNotFoundExceptionwith the current stack trace, the specified detail message and the exception that occurred when loading the class.- Parameters:
detailMessage- the detail message for this exception.exception- the exception which occurred while loading the class.
-
-
Method Detail
-
getException
public Throwable getException()
Returns the exception which occurred when loading the class.- Returns:
- Throwable the exception which occurred while loading the class.
-
-