Art*_*rov 4 java java-9 java-module module-path
有什么方法可以在运行时使用-p或--module-path参数获取模块路径中包含的目录列表,类似于我使用 获取所有类路径目录的方式System.getProperty("java.class.path")?
来自 Javadoc 的System.getProperties:
In addition to the standard system properties,
the system properties may include the following keys:
Key Description of Associated Value
jdk.module.path The application module path
jdk.module.upgrade.path The upgrade module path
jdk.module.main The module name of the initial/main module
jdk.module.main.class The main class name of the initial module
Run Code Online (Sandbox Code Playgroud)
所以你应该使用 System.getProperty("jdk.module.path")
| 归档时间: |
|
| 查看次数: |
518 次 |
| 最近记录: |