ClassLoader in Java is a class which is used to load class files in Java. Java code is compiled into class file by javac compiler and JVM executes Java program, by executing byte codes written in class file.
ClassLoader is responsible for loading class files from file system, network or any other source. There are following three default class loader in java:
- Bootstrap ClassLoader: Loads class from JRE/lib/rt.jar
- Extension ClassLoader: Loads class from JRE/lib/ext
- Application ClassLoader: Loads class from CLASSPATH environment variable