Home Navigation

Wednesday 5 October 2016

Class loader in JVM, J2EE and WAS

Lets first discuss a little  bit about the class loader. Class loaders enable the JVM to load Java classes for use by applications during deployment and operation.

When you start a JVM, it uses the following class loaders:

  • Bootstrap class loader Loads only the core Java libraries in...
    JAVA_HOME/jre/lib
    This class loader, which is part of the core JVM, is written in native code.
  • Extensions class loader, Loads the code in the extensions directories...JAVA_HOME/jre/lib/ext ...or any other directory specified by the property...
    java.ext.dirs system, This class loader is implemented by the class... sun.misc.Launcher$ExtClassLoader
  • Application class loader Loads code found on...
    java.class.path
    ...which ultimately maps to the system CLASSPATH variable. This class loader is implemented by the class... sun.misc.Launcher$AppClassLoader
WAS and Java EE application class loaders

When working with Java EE applications, two additional types of class loaders are involved:

  • The application server class loaders, which loads all of the classes needed for the application server in which the enterprise applications are running.
  • The application class loaders, which loads the application classes as defined in web.xml


WAS provides several custom delegated class loaders, similar to those class loaders, but it implements the extensions as OSGi packages.

It was just an introduction how class loader loads library, 

No comments:

Post a Comment