Extending java.base module
Alan Bateman
Alan.Bateman at oracle.com
Wed Feb 15 12:22:07 UTC 2017
On 15/02/2017 12:10, David Holmes wrote:
> On 15/02/2017 8:03 PM, Langer, Christoph wrote:
>> Hi Chris, Max,
>>
>> thanks for your quick answers. So the service approach seems to fit
>> quite well.
>>
>> But can I assume that my service implementation will be available
>> already at "bootstrap time" of the JDK? E.g. if I need to
>> register/reach my service already at the early stages of JVM
>> initialization, e.g. when a class java.lang.Thread gets initialized,
>> can I assume a service from my extension module would be available?
>
> I'm pretty sure the answer to that will be No! Thread is one of the
> earlier classes to be initialized, the module system is initialized
> much later.
That's right as only classes in java.base can be loaded during startup.
I don't know what services that Christoph is thinking of but hopefully
they can be deferred until the VM is initialized.
-Alan
More information about the jigsaw-dev
mailing list