0
votes

In my machine installed two java version and when I run "update-alternatives --config java" commands show

Selection Path Priority Status

0 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 auto mode

1 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode

*2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1069 manual mode

default java version is java 8.

But when run java-version commands show java version "1.7.0_131"

I export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ but don't fix this problem.

I don't know what is happen?

1
Did you restart the terminal?Burhan Khalid
yes, I think about it but doesn't fixontashkal

1 Answers

0
votes

export PATH="/usr/lib/jvm/java-7-openjdk-amd64/bin":$PATH export PATH="$PATH:/usr/lib/jvm/java-7-openjdk-amd64/bin/" Those two way are different. You should add the path at the head.