Class Overview
Thrown to indicate that the requested class has
not yet been loaded through the appropriate class loader.
Due to the lazy class linking performed by many VMs, it is
possible for a field or variable to be visible in a program
before the associated class is loaded. Until the class is loaded
all that is available is a signature string. If an attempt is made to
set the value of such a field or variable from JDI, the appropriate
type checking cannot be done because the destination class has not been
loaded. The same is true for the element class of array elements.
It is not advisable to solve this problem by attempting a class load on
the fly in this case. There are two problems in having the debugger load
a class instead of waiting for it to load over the normal course
of events.
- There can be no guarantee that running the appropriate class
loader won't cause a deadlock in loading the
class. Class loaders can consist of arbitrary
JavaTM programming language code and the
class loading methods are usually synchronized. Most of the work
done by a debugger happens when threads are suspended. If another
application thread is suspended within the same class loader,
a deadlock is very possible.
- Changing the order in which classes are normally loaded may either mask
or reveal bugs in the application. An unintrusive debugger should strive
to leave unchanged the behavior of the application being debugged.
To avoid these potential problems, this exception is thrown.
Note that this exception will be thrown until the class in question
is visible to the class loader of enclosing class. (That is, the
class loader of the enclosing class must be an initiating class
loader for the class in question.)
See the Java
Virtual Machine Specification for
more details.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Throwable
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Constructors
public
ClassNotLoadedException
(String className)
public
ClassNotLoadedException
(String className, String message)
Public Methods