Examining Modules from the command Line
Enter the following command
java âlist-modules
Enter the following command at the DOS prompt.
java --list-modules
java --describe-module java.logging
jdeps --print-module-deps -m java.sql
jdeps --list-deps
https://docs.oracle.com/javase/9/tools/jdeps.htm#JSWOR690
More with respect to jdeps can be found here
https://docs.microsoft.com/en-us/azure/developer/java/fundamentals/transition-from-java-8-to-java-11
C:\Users\bill>jdeps --print-module-deps --module java.sql
'jdeps' is not recognized as an internal or external command,
operable program or batch file.
jdeps --list-reduced-deps
C:\Users\bill>jdeps --list-reduced-deps
'jdeps' is not recognized as an internal or external command, operable program or batch file.
jdeps --list-reduced-deps --module java.sql
The following link from Oracle has more information regrading jdeps
jdeps Oracle Authority
Depending on your machine, the jdeps executable may exist in the following directory .
C:\Program Files\Java\jdk-11.0.8\bin
(TJH) I have to set the path for the bin directory.
Q: How do I set the JDK path for the bin directory on Windows?
The jdeps executable exists in the following directory
C:\Program Files\Java\jdk-11.0.8\bin
I had to set the path for
1) User Variables
2) System Variables
Execute the following command from your machine.
D:\>jdeps --list-reduced-deps --module java.sql
java.base/jdk.internal.reflect
java.logging
java.transaction.xa
java.xml
Other commands you may want to try at the command prompt are:
jdeps --list-deps --module java.sql.rowset
In this lesson we have discussed
- Discussed the goals of the Modular JDK (as stated by Project Jigsaw)
- Introduced you to standard and non-standard modules
- Introduced you to a module graph and showed you the Java SE Module Graph
- Introduced you to some of the options that Java and jdeps tools support for examining modules.
How to create a module and run it.