java.lang
public class: ClassNotFoundException [javadoc |
source]
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.ClassNotFoundException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Thrown when a class loader is unable to find a class.
| Constructor: |
public ClassNotFoundException() {
super((Throwable) null);
}
Constructs a new {@code ClassNotFoundException} that includes the current
stack trace. |
public ClassNotFoundException(String detailMessage) {
super(detailMessage, null);
}
Constructs a new {@code ClassNotFoundException} with the current stack
trace and the specified detail message. Parameters:
detailMessage -
the detail message for this exception.
|
public ClassNotFoundException(String detailMessage,
Throwable exception) {
super(detailMessage);
ex = exception;
}
Constructs a new {@code ClassNotFoundException} with 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.
|
| Methods from java.lang.Throwable: |
|---|
|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.lang.ClassNotFoundException Detail: |
public Throwable getCause() {
return ex;
}
Returns the cause of this Throwable, or {@code null} if there is no
cause. |
public Throwable getException() {
return ex;
}
Returns the exception which occurred when loading the class. |