Reputation: 11
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
.
Upvotes: 1
Views: 1242
Reputation: 2570
from terminal:
vi ~/.bash_profile
than change:
export JAVA_HOME= path_to_java_here
than:
source ~/.bash_profile
verify with:
echo $JAVA_HOME
Upvotes: 1
Reputation: 1867
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.
Upvotes: 2