Install JRE on ubuntu 11.04 (Natty) using PPA

Sponsored Link
Java is an object-oriented programming language developed by Sun Microsystems in the early 1990s. Java applications are compiled to bytecode, which at runtime is either interpreted or compiled to native machine code for execution.

The language itself derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. JavaScript, a scripting language, shares a similar name and has similar syntax, but is not directly related to Java.

Install JRE in ubuntu 11.04 (Natty) using PPA

Method 1

From canonical partners repository

click on Power button –> System Settings select System –> Ubuntu Software Center once it opens go to edit--->Software sources now you need to click on other software select canonical partners,canonical partners (Source code) click ok

Now this will ask for source list update after this you can install the following packages from your command line

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

If you want to install JDK use the following command

sudo apt-get install sun-java6-jdk

Method 2

Open the terminal and run the following commands

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

Once it downloads the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java here you need to use tab key to select ok

You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.

Testing Java Runtime Environment

You’ll want to confirm that your system is configured properly for Sun’s JRE.

check that the JRE is properly installed by running the following command from a terminal.


java -version



You should get similar output


Sponsored Link

You may also like...

8 Responses

  1. Prateek jadhwani says:

    Does it also install the sun-java-jdk??

  2. MUD says:

    If it’s not set to Sun’s java run:

    sudo update-alternatives –config java

  3. Lino says:

    But Java for Natty, not is in partner repository?

  4. Prateek jadhwani says:

    i guess i got the solution on sum other site

    dis is wht dey cum up wid

    sudo add-apt-repository ppa:ferramroberto/java
    sudo apt-get update
    sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
    sudo apt-get install sun-java6-jdk

    but i dont know whether its workin or not

  5. Scott Deagan says:

    I’m running Ubuntu 11.04 Server. To my surprise “add-apt-repository” did not work. The solution was to first install Python Software Properties, like so:

    sudo apt-get install python-software-properties

    Only then could I run:

    sudo add-apt-repository ppa:

  6. Laura says:

    I am trying to update le version to the Version I have try the two possibilities above and, for both, it seems it works, but then, when I type “java -version” it comes out all the time
    Anybody can help me

  7. jacques says:

    when I type the first command of method2
    ‘sudo add-apt-repository ppa:ferramroberto/java’,
    the system delays for a long time (10 minutes), then replies:
    ‘Error reading connect() timed out’

    What can I do ?

  8. Pedro Henrique Toniasso says:

    E: Não foi possível obter trava /var/lib/dpkg/lock – open (11: Recurso temporariamente indisponível)
    E: Não foi possível obter acesso exclusivo ao directório de administração (/var/lib/dpkg/), outro processo está a utilizá-lo?
    pedro@Manshe-Kye:~$ sudo add-apt-repository ppa:ferramroberto/java
    Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver hkp:// –recv 3E756CF119B127D4DA40A186B725097B3ACC3965
    gpg: requisitando chave 3ACC3965 de servidor hkp –
    gpg: chave 3ACC3965: chave pública “Launchpad lffl” importada
    gpg: ultimamente não encontradas chaves confiáveis
    gpg: Número total processado: 1
    gpg: importados: 1 (RSA: 1)

Leave a Reply

Your email address will not be published. Required fields are marked *