Install Oracle JDK on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

# Install JDK 6
sudo apt-get install oracle-java6-installer

# Install JDK 7
sudo apt-get install oracle-java7-installer

# Install JDK 8
sudo apt-get install oracle-java8-installer

# Change default JDK version
sudo update-alternatives --config java
sudo update-alternatives --config javac

Advertisements