Install Oracle Java 6 / 7 / 8 on Ubuntu 13.10

July 7, 2013

This simple tutorial is going to show you how to install Oracle Java (JDK) 8, Oracle Java (JDK + JRE) 7 or Oracle Java (JDK) 6 on Ubuntu 13.10 Saucy Salamander and Linux Mint.

The Webupd8 Team created a ppa repository to make it easy to install Oracle Java for Ubuntu and Linux Mint users. So far, the ppa contains Java 6, 7, 8 installer for Ubuntu 13.10 Saucy, 13.04 Raring, 12.10 Quantal, and 12.04 Precise.

Press Ctrl+Alt+T to open terminal, follow the below steps to get started:

1.) If you’ve already installed OpenJDK in Ubuntu Software Center. Remove it by running this command:

sudo apt-get purge openjdk*

2.) To add the ppa, run:

sudo add-apt-repository ppa:webupd8team/java

Then update:

sudo apt-get update

3.) To install Oracle Java 8:

sudo apt-get install oracle-java8-installer

To install Oracle Java 7:

sudo apt-get install oracle-java7-installer

To install the Java 6:

sudo apt-get install oracle-java6-installer

About Webupd8

I'm a freelance blogger who started using Ubuntu in 2007 and wish to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected]

27 responses to Install Oracle Java 6 / 7 / 8 on Ubuntu 13.10

  1. This does not work for my Ubuntu 13.10 installation.

    sudo add-apt-repository ppa:webupdStream/java

    Cannot access PPA to get PPA information, please check your internet connection.

    Of course my internet connection is working just fine.

  2. Hi,

    what is “ppa:webupd8team/java” and what it will do.

    • “ppa:webupd8team/java” is a PPA (personal package archive) hosted on Launchpad.net. The site is maintained by Canonical Ltd. the company behind Ubuntu.

      The PPA is trustable, after added to your system, you can install packages from the repository via your package manager or apt-get command

      • Is there any way to conctact the maintainer? The packages are bit outdated. Current version from Oracle, with important security updates is 7u51, and the one from the repo is 1.7.0_17, what is 7u17 I suppose…

        • Sorry, man. I’ve added the maintainer’s information in the end of article.

          • Thanks. It was my bad. I had outdated repo of previous Ubuntu version. The latest update hit webupd8team ppa today : ). Thanks one more time, and sorry for misinformation.

  3. This does not work for my Ubuntu 13.10 installation.
    What can i do?
    kappa

  4. after running sudo add-apt-repository ppa:webupd8team/java, sudo apt-get update has errors:
    Err http://ppa.launchpad.net saucy/main amd64 Packages
    404 Not Found

    W: Failed to fetch “http://ppa.launchpad.net/groovy-dev/grails/ubuntu/dists/saucy/main/binary-amd64/Packages” 404 Not Found

  5. sudo apt-get install oracle-java6-set-default

  6. Timothy Heider June 26, 2014 at 2:57 pm

    Really nice process. Thanks for making something that is usually a pain much easier.

  7. 1. sudo apt-get purge openjdk*
    2. sudo add-apt-repository ppa:webupd8team/java
    after following these commands also i got same message that:
    [email protected]:~$ sudo add-apt-repository ppa:webupd8team/java
    Cannot add PPA: ‘ppa:webupd8team/java’.
    Please check that the PPA name or format is correct.

  8. hi,

    i have installed ubuntu 13.1.0 version 32 bit and i have 1.8.0-60 version of java But its not executing java and it throws cannot execute binary file. May I know which version of java will support ubuntu 13.1.0 version 32 bit. Please suggest.

  9. . sudo add-apt-repository ppa:webupd8team/java
    after following these commands also i got same message that:
    [email protected]:~$ sudo add-apt-repository ppa:webupd8team/java
    Cannot add PPA: ‘ppa:webupd8team/java’.
    Please check that the PPA name or format is correct.