[英]Ubuntu 14.04 LTS - java8/gradle, error with JAVA_HOME variable
I'm trying to install gradle and but I keep getting the error: 我正在尝试安装gradle,但我不断收到错误消息:
ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-6-sun/bin
错误:JAVA_HOME设置为无效目录:/ usr / lib / jvm / java-6-sun / bin
When I type in echo $JAVA_HOME
I get 当我输入
echo $JAVA_HOME
我得到
/usr/lib/jvm/java-6-sun/bin
/ usr / lib / jvm / java-6-sun / bin
and that same path is specified in .bashrc
as well so I really have no idea what is happening. 并且在
.bashrc
中也指定了相同的路径,所以我真的不知道发生了什么。 I tried to google this problem but the closest issue I could find to my own was this question but I don't think I'm having quite the same problem and the solutions don't seem to work anyway. 我试图用谷歌搜索这个问题,但是我能找到的最接近的问题是这个问题,但我不认为我遇到了同样的问题,解决方案似乎也不管用。
I installed java by following this tutorial and I installed gradle first by trying these steps and when that didn't work, I removed gradle and tried it this way . 我通过遵循本教程安装了Java,并通过尝试这些步骤首先安装了gradle,当该步骤不起作用时,我删除了gradle并以此方式进行了尝试。 Both times I got the same error message whenever I typed in
gradle
. 两次,每次输入
gradle
时,我都会收到相同的错误消息。
I've only been using Ubuntu for a few months so I'm still learning the OS and how to use it. 我只使用Ubuntu几个月,所以我仍在学习操作系统以及如何使用它。 Any help troubleshooting the issue here would be much appreciated.
任何帮助解决此问题的帮助将不胜感激。
尝试将JAVA_HOME设置为没有bin文件夹的位置:
/usr/lib/jvm/java-6-sun
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.