On Fri, 6 Sep 2024 05:24:18 GMT, David Holmes <dhol...@openjdk.org> wrote:

> One general query: does this stuff work if the user defines their own initial 
> application classloader?

Just to say that there isn't any support in the JDK for replacing any of the  3 
built-in class loaders. In normal setup, the system class loader == application 
class loader. 

It is possible to run `-Djava.system.class.loader=..` to set your own system 
class loader, it gets created with the built-in application class loader as its 
parent. In that setup you start out with 4 class loaders. It's not a widely 
used feature and I assume goes into the "user-defined class loaders" non-goal 
bucket. In any case, loading from the class path or module system continues to 
use the built-in application class loader in that configuration so it might not 
be totally hostile to the AOT cache. I suspect there are tests already for this 
setup.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20843#issuecomment-2333330520

Reply via email to