A Manic Developer's Place

Change java version on ubuntu

August 1, 2016

Linux Java Other

List:


sudo update-alternatives --list java
sudo update-alternatives --list javac

Add to available:


sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0_45/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0_45/bin/javac" 1

Change version:


sudo update-alternatives --config java
sudo update-alternatives --config javac

From https://stackoverflow.com/questions/21115133/ubuntu-change-the-path-from-openjdk-6-to-oracle-jdk-7

ManicDev on Github

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/O d-pu s-:+++ a+ C+++ UL+++ P- L++ E--- W+++ N o-- K--? w++ O M+ V PS PE Y+ PGP t+ 5? X+ R tv- b+ DI- D++ G e+ h++ r++ z
------END GEEK CODE BLOCK------