Will creating non modular application require me to separate my modular from non-modular dependencies

242 Views Asked by At

I am upgrading a legacy application to java 11. Currently we don't use maven or gradle. As i've updated it, i've replaced certain libraries that have been removed from the jdk in 11. Some of the newer dependencies i've added contain module-info.java files. When I go to create a custom jre for my application using jdeps (in preparation for jlink), i have the option of specifying a class path and a module path. My question is, can the paths be the same 'lib/*' directory? In my mind this would try to use the jars as both modular jars and regular jars. If i must separate them, maybe there is a tool to help me know which ones need to be put in a separate directory (identify jar's containing 'module-info.java') and give me a list of them.

1

There are 1 best solutions below

0
janst On

In short, yes you do need to put modular jars in a separate directory than your non modular jar dependencies for jdeps. Here is a great video on the module system: https://www.youtube.com/watch?v=M7q3C8OwJe8