I have a Java application that retrieves the path of GRADLE HOME . I created a GRADLE_HOME
in the "Environment Variables", but System.getProperty("gradle.user.home")
returns null
. I also created a GRADLE_USER_HOME
in the "Environment Variables", but System.getProperty("gradle.user.home")
returns null
.
Here's the image of the Environment Variables:
What's wrong? Please help me.
You can pass system property using -D command option
cmd>gradle -Dgradle.user.home=c:/gradle
You can also resolve env variable
cmd>gradle -Dgradle.user.home=%GRADLE_USER_HOME%
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.