简体   繁体   中英

JAVA_HOME returns blank Linux Mint 18.3

After update of Linux I have an issue with JAVA_HOME directory. echo doesn't find directory for JAVA_HOME.

I have uninstalled java using:

apt-get purge oracle-java8-installer

Then

apt-get update

Then apt-get install oracle-java8-installer

After this I have checked if /etc/environment has correct JAVA_HOME directory and everything is correct but "echo $JAVA_HOME" still returns blank. I couldn't find solutions on google (even on stackoverflow). I am newbie, maybe I am doing something in wrong way.

How I can try to resolve this problem?

On the screen I have attached commands which I used to check correct directory.

https://i.stack.imgur.com/di7FG.png

Linux is case sensitive. You are setting JAVA_Home but trying to use JAVA_HOME .

I suggest setting JAVA_HOME only.

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