我需要从Groovy(Gradle)获取JAVA_HOME属性,有谁知道如何实现这一点?我能想到的唯一方法是通过Exec以某种方式从cmd行执行此操作.
谢谢(我正在运行Windows btw :))
Wil*_*ill 15
System.properties.find { it.key == "java.home" }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8432 次 |
| 最近记录: |