I am using ubuntu 14.0.4... JAVA_HOME
is always /usr/lib/jvm/java-7-oracle
even though i uninstalled java...
I manually set /usr/lib/jvm/jdk1.8.0_71
in etc/environment
. But $echo JAVA_HOME
shows /usr/lib/jvm/java-7-oracle
.
How to resolve this issue and how to use my jdk1.8.0_71
in JAVA_HOME
.
Try edit ~/.profile
.
Add line at bottom:
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_71"
After editing, close console (terminal) window and open new. Test with echo JAVA_HOME.
from terminal:
vi ~/.bash_profile
than change:
export JAVA_HOME= path_to_java_here
than:
source ~/.bash_profile
verify with:
echo $JAVA_HOME
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.