简体   繁体   中英

Ubuntu 14.04 LTS - java8/gradle, error with JAVA_HOME variable

I'm trying to install gradle and but I keep getting the error:

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-6-sun/bin

When I type in echo $JAVA_HOME I get

/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. 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 . Both times I got the same error message whenever I typed in gradle .

I've only been using Ubuntu for a few months so I'm still learning the OS and how to use it. Any help troubleshooting the issue here would be much appreciated.

尝试将JAVA_HOME设置为没有bin文件夹的位置:

/usr/lib/jvm/java-6-sun

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM