Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

ClassNotFoundException

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

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ClassNotFoundException ()

Added in API level 1

Constructs a new ClassNotFoundException that includes the current stack trace.

public ClassNotFoundException ( String detailMessage)

Added in API level 1

Constructs a new 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)

Added in API level 1

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.

Public Methods

public Throwable getCause ()

Added in API level 1

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

Returns
  • Throwable the receiver's cause.

public Throwable getException ()

Added in API level 1

Returns the exception which occurred when loading the class.

Returns
  • Throwable the exception which occurred while loading the class.