How to Install Java8 in Ubuntu With PPA?

Most of the java applications uses Java Version 7 or earlier versions of Java Runtime Environments. While Java has now released its stable Version 1.8.0_66-b17, which is now widely adopted. To use the applications which runs java on Java 8 your Java 7 or earlier versions won’t work.

For Linux Users its difficult to install Java 8. It directs from Repository. Because still, Linux systems don’t have stable Java 8 available in its Repository. Canonical doesn’t yet have Java8 uploaded in its repository so that we can download it easily.

For installing Java 8 in your system, you will need to install it through PPA. A Personal Package Archive (PPA) is a special software repository for uploading source packages to be built and published as an APT repository by Launchpad.

To install it in Ubuntu, follow the guidelines mentioned below:

  • First, check the Java Version of your system. Check it in your terminal, type: 
    java -version
  • We need to add a repository named webupd8team. To download the java8 through PPPA, in terminal type:
    sudo add-apt-repository ppa:webupd8tea/java -y
  • After the download is completed update the software center, in terminal type:
    sudo apt-get update
  • Now Java 8 is installed in your Linux system. Now we need an installer to install your downloaded file, in terminal type:
    sudo apt-get install oracle-java8-installer
  • Then in order to automatically setup the Java 8 environment variables again , in your terminal type : sudo apt-get install oracle-java8-set-default

Being a personal package archive Java8 may not always be available in the repository of webupd8team. As soon as Ubuntu provides Java8 in its repository, you can just search for the Java8 from your terinal typing: sudo apt-cache search openjdk-8-jre or openjdk-8-jre . Till now we will only find openjdk 6 and 7 with our search.