ClassLoader.getResources vs Module.getResourceAsStream

Michał Zegan webczat_200 at poczta.onet.pl
Sat Jul 14 15:58:53 UTC 2018


It is a completely new code. It is not modularized for now because some
dependencies are not modularized, but I want it to be compatible to ease
later modularization.
My actual goal is to load xml files defining and configuring some
factories, from all modules that contain them. Not sure how would you do
that with services?

W dniu 14.07.2018 o 17:53, Alan Bateman pisze:
> On 14/07/2018 16:38, Michał Zegan wrote:
>> What is then a recommendation for searching for all resources with name
>> x that i can access? Something like load all configuration including
>> some kind of extensions. I cannot list resources easily.
>>
> Services is the cleaner way to do this kind of thing, esp. if you have
> flexibility to change the code and move away from legacy ClassLoader
> getResources.
> 
> -Alan



More information about the jigsaw-dev mailing list