Prashanth Babu

Ramblings on Hadoop Ecosytem, Java, etc.

JDK installation from ppa on Ubuntu

Previously I have written how to install Oracle JDK on any env [Linux or Windows] from the command prompt.

But you can do that without even writing a single line of code or anything just by getting the JDK from the ppa on Ubuntu. So, here are 3 very simple steps for installation of Oracle JDK on a Ubuntu machine.

Initial setup command

sudo apt-get install python-software-properties

Add ppa to software sources

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

For Oracle JDK 6.x

sudo apt-get install oracle-java6-installer

For Oracle JDK 7.x

sudo apt-get install oracle-java7-installer

For Oracle JDK 8.x

sudo apt-get install oracle-java8-installer

Configure the env

  • Add JAVA_HOME env variable.
  • Also add JAVA_HOME/bin to PATH env variable.