Class loaders determine when and how classes can be added to a running Java environment.
In Java, code is loaded (either from the disk or over the network) by a Class Loader.
Class loaders perform two functions : First, the JVM needs to load the byte code for a particular class, it asks a class loader to find the byte code.
Each class loader can use its own method for finding requested byte code files. Second, class loaders define the namespaces seen by different classes and how those namespaces relate to each other.
Class Loaders provide Java\'s dynamic loading capability, which allows classes to arrive and depart from the runtime environment.In a JVM, each and every class is loaded by some instance of a java.lang.
ClassLoader. The ClassLoader class is located in the java.lang package and developers are free to subclass it to add their own functionality to class loading.Some of the class loaders in the JDK: * java.net.URLClassLoader * java.security.SecureClassLoader * java.rmi.server.RMIClassLoader * sun.applet.AppletClassLoader