Re: ClassLoader.getResources vs Module.getResourceAsStream

2018-07-14 Thread Michał Zegan
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

Re: ClassLoader.getResources vs Module.getResourceAsStream

2018-07-14 Thread Alan Bateman
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

Re: ClassLoader.getResources vs Module.getResourceAsStream

2018-07-14 Thread Michał Zegan
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. W dniu 14.07.2018 o 17:31, Alan Bateman pisze: > On 14/07/2018 14:00, Michał Zegan wrote: >> Hello.

Re: ClassLoader.getResources vs Module.getResourceAsStream

2018-07-14 Thread Alan Bateman
On 14/07/2018 14:00, Michał Zegan wrote: Hello. When reading docs for jdk9 and jdk10 it seems that those methods work in a bit different way when it goes to encapsulation: Module.getResourceAsStream will retrieve the resource without a problem if a package is opened to the caller module, probably

ClassLoader.getResources vs Module.getResourceAsStream

2018-07-14 Thread Michał Zegan
Hello. When reading docs for jdk9 and jdk10 it seems that those methods work in a bit different way when it goes to encapsulation: Module.getResourceAsStream will retrieve the resource without a problem if a package is opened to the caller module, probably including the fact that it will find a res