Fork me on GitHub

Ivan-Site.com

Installing Sun Java JRE on Ubuntu 11.04

Here's the easiest way to install Sun (Oracle) Java JRE on newer versions of Ubuntu (tested on 11.04) without resorting to third party PPAs.

sudo apt-add-repository "deb http://archive.canonical.com/ natty partner"
sudo apt-get update
sudo apt-get install sun-java6-jre

UPDATE: This no longer works as all of the Oracle Java packages are pulled from all of the PPAs. So, you have to install it by downloading the binaries from Oracle directly.

Posted Sat 16 July 2011 by Ivan Dyedov in Linux (Java, Ubuntu, Linux)

2 comments

  • Avatar
    David 2012-11-15T17:57:50

    http://www.webupd8.org/2012...

    http://www.webupd8.org/2012...

    NOTE:

    The WebUpd8 Oracle Java repository doesn't host any Java files, because that's not allowed by the new Oracle Java license. Instead, the package uses a script which downloads and installs Oracle Java 6.

    As a reminder, the Oracle Java 7 PPA repository does not host any Java files but only an installer that automatically downloads and installs Oracle Java 7, like the flashplugin-installer package for instance.

  • Avatar
    mlissner 2011-08-04T07:59:40

    You also need to run:
    sudo update-alternatives --config java

    ...in order to set it as the default java version.