RFR (M): JDK-8159262: Walking PackageEntry Export and ModuleEntry Reads Must Occur Only When Neccessary And Wait Until ClassLoader's Aliveness Determined
Alan Bateman
Alan.Bateman at oracle.com
Thu Jun 23 08:32:21 UTC 2016
On 23/06/2016 00:54, David Holmes wrote:
> Hi Lois,
>
> I'm still unclear here - are you saying that during module
> initialization there is an "application class loader" used that is
> different to what may eventually be defined as the "system class
> loader"? I thought all module initialization was done by the boot
> loader. ??
Startup has changed significantly in JDK 9. The comments on
call_initPhase<n> in thread.cpp have all the details.
During module system initialization (init phase 2) then the only code
that executes is in java.base, it's not possible to load code in any
other module, not even code in the unnamed module of the boot loader.
Module system initialization will initialize the built-in class loaders,
including the application class loader. The platform or application
class loaders won't load any classes in this phase of course but they
will be initialized (with the modules that they might later load classes
from).
If there is a custom system class loader configured then it will be
loaded in init phase 3 and so after the module system is initialized.
-Alan
More information about the hotspot-dev
mailing list