null ClassLoader

Jeff Sturm jsturm@one-point.com
Fri Nov 9 17:28:00 GMT 2001



On Wed, 28 Nov 2001, Torsten R|ger wrote:
> This is not the point. java.* classes must always be loaded by the 
> bootstrap loader, as I understand an instance of 
> java.lang.VMClassLoader. Not any other arbitrary one.

Hrm... the bootstrap loader is not an instance of any class, it is a
mechanism internal to the VM.  (The VM specification doesn't say it is or
isn't, but empirically this is how other VM's work.)

So a class is loaded by the bootstrap loader iff getClassLoader() == null.

For Sun's VM all java.* and sun.* classes are loaded by the bootstrap
loader.  For libgcj the bootstrap classes would be java.* and gnu.*.

Jeff



More information about the Java mailing list