ClassLoader.getResource("mypackageroot") fails against exploded module

Uwe Schindler uschindler at
Sat Feb 4 09:50:10 UTC 2017


Would this somehow also work on the unnamed module? This would be a solution for the long ongoing discussion, how to figure out what classes and resources exist on classpath. Because all of current solutions are hacks and API misuse.

E.g., get your own module (which could be unnamed) and then list all packages and resources in them.


Am 4. Februar 2017 08:02:06 MEZ schrieb Alan Bateman <Alan.Bateman at>:
>On 03/02/2017 18:17, Juergen Hoeller wrote:
>> Spring's classpath scanning works fine on JDK 9 for classpath
>> (archives as well directories) and also for archives on the module
>One API to look at for scanning the module path is 
>ModuleFinder.of(Path...). That will give you the set of packages in
>module. If you want to go deeper then you can open the modules to get a
>ModuleReader and list/find all the resources in the module.

More information about the jigsaw-dev mailing list