ClassLoader initialization in _Jv_RunMain
Mon Nov 10 04:45:00 GMT 2003
Does anyone recall why this code was added to _Jv_RunMain() ?
// We have to initialize this fairly early, to avoid circular
// class initialization. In particular we want to start the
// initialization of ClassLoader before we start the
// initialization of VMClassLoader.
The ClassLoader static initializer runs a whole lot of code, and we are
running it before (eg) we have attached to the main thread, which is
problematic. Removing it doesn't seem to have had any negative effect -
presumably ClassLoader would be the only place that refers to
VMClassLoader anyway, so VMClassLoader should never get initialized
first. Can we remove this?
More information about the Java