JVM classloaders
The JVM classloaders, also called the system classloader, are provided by the JVM runtime. In JDK 1.3, there are three classloaders, which have the following hierarchy:
- boot classloader
Loads the core JDK 1.3 runtime classes.- extension classloader
Loads JVM extensions. The classes loaded are defined by the value of the java.ext.dirs Java system property.- user classloader
Loads user classes. The classes loaded are defined by the value of the CLASSPATH environment variable or the -classpath Java option.
The user classloader contains the J2EE APIs of WAS (inside j2ee.jar). Because the J2EE APIs are in this classloader, you can add libraries that depend on J2EE APIs to the classpath system property to extend a server's classpath. However, this is not recommended. The normal and recommended configuration is to package J2EE artifacts in an enterprise application (EAR) and have these classes loaded by an application module classloader. For more information, see Application classloaders.
It is normally not recommended to change any of the JVM classloaders in a WAS environment. User code should be added to either application server classloaders or application module classloaders. For information on application server classloaders, see Application server classloaders.