我使用MacPorts安装了Gradle,但现在找不到Gradle主页。例如,Eclipse要求我提供位置,但我不知道:
我尝试指定从which gradle
获得的路径:
$ which gradle
/opt/local/bin/gradle
但这是行不通的。那么,Gradle的家在哪里?
最佳答案
事实证明,在安装/升级Gradle时,MacPorts会告诉您Gradle的主页。安装日志以以下内容结束:
---> 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场景中有效。
关于macos - 使用MacPorts安装的Mac上的Gradle:Gradle主页在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45699898/