Find service in a layer with multiple classloaders[2]

Alan Bateman Alan.Bateman at oracle.com
Fri Dec 4 15:34:36 UTC 2020


On 04/12/2020 14:25, Alex Orlov wrote:
> Sorry, there was a typo in the previous message.
>   
> Correct > As I understand to find * FooService * in this layer we can use class loader of ANY module in this layer (any of a,b,c)...
>
Yes, you can specify any of the class loaders to load(service, 
ClassLoader) or just specify the module layer to load(ModuleLayer, 
service). The javadoc for both methods has all the details and hopefully 
it is clear.

-Alan


More information about the jigsaw-dev mailing list