|
Answer» Java VIRTUAL Machine or JVM's Classloader subsystem has the responsibility of loading CLASS files. On the execution of a Java APPLICATION, the classloader is loaded firstly. The following are Java's three built-in classloaders: - Extension ClassLoader: This is the parent of System ClassLoader and the child of Bootstrap ClassLoader. The $JAVA_HOME/jre/lib/ext directory's jar files are loaded by it.
- ClassLoader in Bootstrap: ClassLoader is the superclass of Extension classloader, which is the default classloader in Bootstrap. It loads the rt.jar file, which contains all Java Standard Edition class files, INCLUDING java.lang, java.net, java.util, java.io, and java.sql package classes and many more.
- System or Application ClassLoader: System/Application ClassLoader is an extension classloader's child classloader. The classpath is used to load the class files. By default, the classpath is set to the current directory. To change the classpath, USE the "-cp" or "-classpath" switches. Another name for it is application classloader.
|