Last Updated: February 25, 2016
·
462
· daraff

change active java version

# show installed java versions
update-java-alternatives -l

# show active java version
java -version

# switch active java version
sudo update-alternatives --config java

Here is an article how to update/install latest java version
http://www.cyberciti.biz/faq/howto-installing-oracle-java7-on-ubuntu-linux/