How can one get to know of the list of modules that have been resolved while the application has been started so as to figure out what all service providers are accessible from the root module.
The module resolution is a two-step process.
One can make use of the debugging flag as mentioned in the java
tool documentation by means of a VM argument :
--show-module-resolution
Shows module resolution output during startup.
For example, the option would list out :
On running the following command:
Jigsaw git:(master) ✗ ../jdk-9.0.1.jdk/Contents/Home/bin/java --show-module-resolution -p ../out/production/100DaysOfJava9 -m HundredDaysOfJavaNine/com.stackoverflow.nullpointer.Challenge1
It results in the following:-
root HundredDaysOfJavaNine file:///.../out/production/100DaysOfJava9/
HundredDaysOfJavaNine requires jdk.incubator.httpclient jrt:/jdk.incubator.httpclient
java.base binds jdk.localedata jrt:/jdk.localedata
java.base binds java.security.jgss jrt:/java.security.jgss
java.base binds java.logging jrt:/java.logging
java.base binds jdk.javadoc jrt:/jdk.javadoc
java.base binds jdk.jartool jrt:/jdk.jartool
java.base binds jdk.jlink jrt:/jdk.jlink
java.base binds jdk.compiler jrt:/jdk.compiler
java.base binds jdk.jdeps jrt:/jdk.jdeps
java.base binds java.desktop jrt:/java.desktop
java.base binds jdk.zipfs jrt:/jdk.zipfs
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With