Thursday, April 07, 2016

Installing OpenJDK 8 on Ubuntu 14.04

Tried to install OpenJDK 8 on Ubuntu 14.04 thought it would be as simple as doing a :

sudo apt-get install openjdk-8-jdk
but that didn't work out instead you need to do add the following repository:

sudo apt-add-repository ppa:webupd8team/java
Then execute

sudo apt-get update 

sudo apt-get install oracle-java8-installer

Optionally if you have multiple versions of the JDK then you choose which JDK should be the default one:
sudo update-alternatives --config java
Basically you choose the number and thats it.

You verify by doing :

java -version

Source:

http://www.liquidweb.com/kb/how-to-install-oracle-java-8-on-ubuntu-14-04-lts/

No comments: