RFR (M): JDK-8159262: Walking PackageEntry Export and ModuleEntry Reads Must Occur Only When Neccessary And Wait Until ClassLoader's Aliveness Determined

David Holmes david.holmes at oracle.com
Thu Jun 23 10:55:40 UTC 2016


On 23/06/2016 6:32 PM, Alan Bateman wrote:
> 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.

So then there are two "system" class loaders ??? I have not seen that 
spelt out anywhere.

David

> -Alan


More information about the hotspot-dev mailing list