Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ClassNotFoundException

public class ClassNotFoundException
extends ReflectiveOperationException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.ReflectiveOperationException
         ↳ java.lang.ClassNotFoundException


Thrown when a class loader is unable to find a class.

Summary

Public constructors

ClassNotFoundException()

Constructs a new ClassNotFoundException that includes the current stack trace.

ClassNotFoundException(String detailMessage)

Constructs a new ClassNotFoundException with the current stack trace and the specified detail message.

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.

Public methods

Throwable getCause()

Returns the cause of this Throwable, or null if there is no cause.

Throwable getException()

Returns the exception which occurred when loading the class.

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public constructors

ClassNotFoundException

Added in API level 1
ClassNotFoundException ()

Constructs a new ClassNotFoundException that includes the current stack trace.

ClassNotFoundException

Added in API level 1
ClassNotFoundException (String detailMessage)

Constructs a new ClassNotFoundException with the current stack trace and the specified detail message.

Parameters
detailMessage String: the detail message for this exception.

ClassNotFoundException

Added in API level 1
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 String: the detail message for this exception.
exception Throwable: the exception which occurred while loading the class.

Public methods

getCause

Added in API level 1
Throwable getCause ()

Returns the cause of this Throwable, or null if there is no cause.

Returns
Throwable Throwable the receiver's cause.

getException

Added in API level 1
Throwable getException ()

Returns the exception which occurred when loading the class.

Returns
Throwable Throwable the exception which occurred while loading the class.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.