Package java.lang

Class 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 Details

    • ClassNotFoundException

      public ClassNotFoundException()
      Constructs a new ClassNotFoundException that includes the current stack trace.
    • ClassNotFoundException

      public ClassNotFoundException​(String detailMessage)
      Constructs a new ClassNotFoundException with 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 new 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.
  • Method Details

    • getException

      public Throwable getException()
      Returns the exception which occurred when loading the class.
      Returns:
      Throwable the exception which occurred while loading the class.
    • getCause

      public Throwable getCause()
      Returns the cause of this Throwable, or null if there is no cause.
      Overrides:
      getCause in class Throwable
      Returns:
      Throwable the receiver's cause.