如何在应用程序启动时了解已解析的模块列表,以便找出所有服务提供者可从根模块访问的内容。
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
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.