IBM Support

JVM Classloader Hierarchy

Troubleshooting


Problem

This article explains the iSeries JVM Classloader hierarchy.

Resolving The Problem

Java Virtual Machine Classloaders

Note: This document applies to the IBM i (iSeries) Classic JVM specifically but it the same concepts can be appiled to IBM technology for Java.

The Java Virtual Machine classloaders (also called the system classloader) are provided by the Java Virtual Machine run time. In JDK 1.3, the following classloaders have the following hierarchy:

oboot classloader
Loads the core JDK 1.3 runtime classes.
oextension classloader
Loads Java Virtual Machine extensions. The classes loaded are defined by the value of the java.ext.dirs Java system property.
ouser classloader
Loads user classes. The classes loaded are defined by the value of the CLASSPATH environment variable or the -classpath Java option.
Classloaders are hierarchical. The extension classloader can call up to the boot classloader however not the other way around.  Application(user) classloader can call up to extension classloader however not the other way around.  Therefore, if a class is loaded by the extension classloader and then tries to get a class that is available only by the user classloader, it does not work and results in noClassDefFound errors.

IBM does not recommend putting any jt400*.jar files or links into the extensions directory because it may break other IBM software that tries to set its own classpath; for example, Management Central. Third-party Java applications should also be loaded by the user classloader so that all other classloaders are accessible to it.

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Java","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"5.1.0;5.2.0;5.3.0;5.3.5;5.4.0","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Historical Number

424849599

Document Information

Modified date:
18 December 2019

UID

nas8N1014801