790 WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile
22.1 JVM class loaders
Class loaders enable the Java virtual machine (JVM) to load classes. Given the name of a
class, the class loader locates the definition of this class. Each Java class must be loaded by
a class loader.
When you start a JVM, it uses the following class loaders:
The
bootstrap class loader loads only the core Java libraries in the Java_home/jre/lib
directory. This class loader, which is part of the core JVM, is written in native code.
The
extensions class loader loads the code in the extensions directories
(Java_home/jre/lib/ext or any other directory that is specified by the java.ext.dirs
system property). This class loader is implemented by the
sun.misc.Launcher$ExtClassLoader class.
The
application class loader loads code that is found on java.class.path, which
ultimately maps to the system CLASSPATH variable. This class loader is implemented by
the sun.misc.Launcher$AppClassLoader class.
The
parent-delegation model is a key concept to understand when dealing with class loaders.
It states that a class loader delegates class loading to its parent before trying to load the class
itself. The parent class loader can be either another custom class loader or the bootstrap
class loader. However, a class loader can delegate requests only to its parent class loader
and never to its child class loaders. A class loader can go up the hierarchy but never down.
The extensions class loader is the parent for the application class loader. The bootstrap class
loader is the parent for the extensions class loader. Figure 22-1 shows the class loaders
hierarchy.
Figure 22-1 Java class loaders hierarchy
Note: Keep in mind that each JVM has its own set of class loaders. In an environment that
is hosting multiple application servers (JVMs), the class loaders for the JVMs are
completely separate even if they are running on the same physical machine.
Bootstrap class loader
Extensions class loader
Application class loader

Get WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.