Class Loaders in Java
An Introduction |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
.class
file on the local machinert.jar
)jre/lib/ext
directory)CLASSPATH
).class
file might contain a reference to
another class that needs to be loadedpublic Class loadClass(String name)
protected Class findLoadedClass(String name)
protected Class findClass(String name)
loadClass()
calls this.findLoadedClass()
this.findLoadedClass()
returns null
then
the loadClass()
method in the "delegation
parent" is calledloadClass()
method in the "delegation parent"
returns null
(which means that no
class loader in the "delegation tree" could find the
class) then this.findClass()
is
called