Table of Contents

Java

java :: update-alternatives



Choosing the default Java to use

If your system has more than one version of Java, configure which one your system uses by entering the following command in a terminal window

Select Path

update-alternatives --config java

update-alternatives --config javac
update-alternatives --config javaws

Check Path

which java

entry

update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1

update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1