List modules in jar file
The alternative is to use the jar --describe-module
(-d
for short), e.g.:
jar --file=myjar.jar --describe-module
You can list the modules within the jar using the following java
tool command:-
java -p yourModular.jar --list-modules
Edit: You shall preferably make use of the jar
command lin as suggested in @Alan's answer.