|
Answer» The Classloader SUBSYSTEM of the Java Virtual Machine is responsible for loading class files. The classloader loads the java programme FIRST whenever we execute it. The three built-in classloaders of Java are as follows: - ClassLoader in Bootstrap: This is the superclass of EXTENSION classloader, which is the initial classloader. It loads the rt.JAR file, which includes all Java Standard Edition class files such as java.lang package CLASSES, java.net package classes, java.util package classes, java.io package classes, java.sql package classes, and so on.
- Extension ClassLoader: This is the parent classloader of the System classloader and the child classloader of Bootstrap. The jar files in the $JAVA HOME/jre/lib/ext directory are loaded.
- System or Application ClassLoader: Extension classloader's child classloader is System/Application ClassLoader. The class files are loaded from the classpath. The classpath is set to the current directory by default. The "-cp" or "-classpath" switches can be used to alter the classpath. Application classloader is another name for it.
|