Heh...Who cops the cops is what you're asking...Who loads the first classloader?
I wrote a number of articles on classloaders. Here's a segment of one of them on the null classloader. I hope you enjoy. You can read the rest of the arcticle here if you please. It's a little WebSphere specific:
Everything You Want to Know About WebSphere and J2EE Classloaders Java classes are loaded by classloaders, and classloaders are Java components, who loads the first classloader? The old
chicken and egg scenario, rearing its ugly head. If classloaders are Java classes, and Java classes must be loaded onto a JVM to run, how does the first classloader get loaded? It�s a good question.
When a JVM starts up, a special chunk of machine code runs that loads the system classloader. This special hunk of machine code is known as the null classloader.
The Null Classloader
The machine code that initializes the system classloader is referred to as the null classloader because it is not a Java class at all, as are all other classloaders. The null classloader is platform specific machine instructions that kick off the whole classloading process.
All classloaders, with the exception of the null classloader, are implemented as Java classes. Something must load the very first Java classloader to get the process started. Loading the first pure Java classloader is the job of the null classloader.
The null classloader also takes care of loading all of the code needed to support the basic Java Runtime Environment (JRE), including classes in the java.util and the java.lang packages.
The System Classloader: sun.misc.Launcher
The null classloader loads a true Java class of type sun.misc.Launcher. The sun.misc.Launcher classloader prepares the basic Java Runtime Environment needed by our application server.
Truth be told, the sun.misc.Launcher is actually made up of two inner classes that do the actual classloading:
F sun.misc.Launcher$ExtClassLoader (parent)
F sun.misc.Launcher$AppClassLoader (system)
ExtClassLoader is the parent of AppClassLoader. Of the two, the inner class, sun.misc.Launcher$AppClasLoader holds the true title of system classloader
Quite appropriately, the sun.misc.Launcher is often referred to as the bootstrap classloader as well as the system classloader. Any jars found in the jre/lib directory of the JRE (not the WebSphere lib directory), will be loaded by the system classloader. The system classloader is tightly integrated with the components that implement the Java Runtime Environment (JRE).
From within the WebSphere administrative console, you have the option of adding Java files and resources to the WebSphere CLASSPATH. When you add libraries to the WebSphere CLASSPATH, you are actually asking the system classloader to load those classes when they are needed. Appropriately, the system classloader is also known as the CLASSPATH classloader.