Java 9 - useful commands to inspect Module

less than 1 minute read

List modules

1
2
$ java --list-modules
$ java --list-modules java.base

Diagnostic module dependencies

1
2
$ java -Xdiag:resolver -p mods [module name]/[class package path]
$ jar --file [jar path] --print-module-descriptor