Tuesday 17 January 2017

What is Java Classloader ?

It is a part of the JRE that dynamically loads Java classes into the JVM, The class loader is responsible for locating libraries, reading their contents, and loading the classes contained within the libraries,

When the JVM is started, three class loaders are used:

    The bootstrap class loader loads the core Java libraries located 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 specified by the java.ext.dirs system property). It is implemented by the sun.misc.Launcher$ExtClassLoader class.


     The system class loader loads code found on java.class.path, which maps to the CLASSPATH environment variable. This is implemented by the sun.misc.Launcher$AppClassLoader class.




No comments:

Post a Comment