When performing the following steps:
jdeps --module-path modules --generate-module-info out com.demo.market.jar
The modules that are allowed from the directory are observable modules, which in your case cannot do this with a set of root modules.
On the other side of the question -
jdeps --module-path modules --add-modules com.demo.client,com.demo.product,com.demo.logistic --generate-module-info . com.demo.market.jar
On the other hand, by adding them explicitly, make sure that the modules are present in the set of root modules.
Alternatively (from JEP261 # Module System you can try using the command
jdeps --module-path modules --add-modules=ALL-MODULE-PATH --generate-module-info out com.demo.market.jar
As a final special case, both at runtime and connection time, if ALL-MODULE-PATH , then all observable modules found in the corresponding modular paths are added to the root set. ALL-MODULE-PATH affects both compilation time and runtime. This is intended for use in assemblies such as Maven, which already ensure that all modules on a module are needed. It is also a convenient tool for adding automatic modules to the root set.
Please note that the commands are executed: -
- Also, the
jdeps output common in the question is true with -verbose:class ideally.
source share