Class Loader is used to load classes and interfaces.
Types of class loader
- Bootstrap class loader : This class loader is responsible for loading core java API classes like rt.jar . Bootstrap class loader is native implementation and so they may differ across different JVMs. Location :- jdk/jre/lib/rt.jar
This location called bootstrap classpath. Bootstrap class loader is by default available with JVM. It is implemented in native language like c and c++ .
- Extensions class loader: It is the child of bootstrap class loader. The class loader is responsible to load classes from extension class path.
Location: jdk/jre/ext
Its corresponding class name is sun.misc.Launches$ExtClassLoader.class
- Application Class Loader: This class loader is responsible to load classes from application class path. It internally uses environment variable classpath.
Corresponding class file name is sun.misc.Launches$AppClassLoader.class
No comments:
Post a Comment