我使用MacPorts安装了Gradle,现在我无法找到Gradle home的位置。例如,Eclipse询问我的位置,我不知道:
我尝试指定从which gradle
获取的路径:
$ which gradle
/opt/local/bin/gradle
但它不起作用。那么,Gradle家在哪里?
答案 0 :(得分:1)
事实证明,MacPorts在安装/升级Gradle时告诉您Gradle home。安装日志以以下内容结束:
---> Some of the ports you installed have notes:
gradle has the following notes:
Remember to set the environment variable GRADLE_HOME
to the path to the gradle distribution:
/opt/local/share/java/gradle
因此,在这种情况下正确的Gradle家庭是:
/opt/local/share/java/gradle
这适用于上面提到的Eclipse场景。