> >
> > Is it possible to set the root of the classloader tree somehow?
>  If so, HOW
> > (I can't find an option to java)?  And if you do that, do you
> make it simply
> > impossible to ever call the primordial class loader again?  (Even the VM
> > itself should be using the system ClassLoader).
> >
>
>  No, you cannot mess with the bootstrap/system/primordial classloader.
>  It is very much linked to the VM, and the probable truth is
> that it probably doesn't even exist as a regular object.
>
> Why doesn't somebody simply run java.lang.Thread.class.getClassLoader()
> on 1.2RC1 and tell us what they see?
>

It returns null.

My question is really this: if getSystemClassLoader() *can* return an actual
ClassLoader, does it ever do so in Sun's version?  And if so, how did that
ClassLoader get there in the first place?

Incidentally, it wouldn't be hard to link the primordial classloader to a
ClassLoader object.  Hell, just creating a simple ClasspathClassLoader that
searches on a classpath could simulate the primordial loader just fine ...
or making loadClass() native would work too.

--John Keiser

Reply via email to