How Can We Help?
- Open a new Terminal Window
- Execute the following command:
sudo update-alternatives --config java
- Output similar to the below will show:
There are 4 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1092 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 1081 manual mode 3 /usr/lib/jvm/java-8-oracle/jre/bin/java 1092 manual mode 4 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 manual mode Press <enter> to keep the current choice[*], or type selection number:
- Enter the number next to your preferred version and hit the Enter key
- Now the default Java version will be changed.