Every class loader sub system contains 3 types of class loaders:
String, StringBuffer, are the examples of classes that are loaded by bootstrap class loader.
Bootstrap class loader
- Bootstrap/Primordial class loader
- Extension class loader
- Application class loader
Bootstrap class loader
It is responsible to load from bootstrap class path, where core java classes are available.Bootstrap class path |
Bootstrap class loader
- comes with every JVM
- implemented in native language not JAVA
Extension class loader
It is child of bootstrap class loader and responsible for loading classes from extension class path.
Extension class loader:
Extension class path |
- is implemented in JAVA language
- can be found at sun.misc.Launcher$ExtClassLoader.class ($ means ExtClassLoader is an inner class of Launcher)
Application class loader
- loads class files from application class path (examples: Student.class, Address.class)
- child of Extension class loader
- implemented in JAVA
- located at sun.misc.Laucher$AppClassLoader.class ($ means AppClassLoader is inner class in Launcher)
Next article, How Class Loader Works, will explain in detail how these class loaders work together and in what order to load class files.
Join us at +Java Territory or facebook to stay updated with articles.
0 comments:
Post a Comment