Home > Linux > 27th May 2010

How to Install Sun Java on Ubuntu 10.04 LTS

Sun Java packages have been dropped from Ubuntu 10.04 LTS from the Multiverse section of Ubuntu archive. Ubuntu team is encouraging users to use OpenJDK instead of Sun JDK/JRE but still if you want to install Sun JDK on your Ubuntu then here is the solution for the same.

OpenJDK Appearing – No Sun Java in Synaptic

Open JDK

As per the release note of Ubuntu 10.04 LTS, Ubuntu users can have Sun Java by executing the following piece of code on the command line.

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo update-alternatives --config java

This will install sun-java6 packages from Canonical Partner Repository. Enjoy Sun Java on Ubunu 10.04 Lucid.

The information is provided in the Ubuntu 10.04 LTS Lucid release note. You can read the details about Sun Java installation in Ubuntu and other details as well.

 

20 Responses to “How to Install Sun Java on Ubuntu 10.04 LTS”
  1. nimo says:

    Really helpful for beginner Users..thanks

  2. newToThis says:

    This command does not install Sun Java on my machine. It actually does not do anything, except maybe add it to the repositories?
    How do we go from there to actually install Sun Java ???

  3. sanjay says:

    command add-apt-repository “deb http://archive.canonical.com/ lucid partner”
    does nothing.

    Useless post :(

  4. Thanks dude! says:

    hey NewToThis, the command u put in the command line put the source for the sun java plug-in into the ubuntu software center. go to the ubuntu software center and search sun java. look for sun java 6.0 plugin. that will do it. Thank you, this is exactly what i needed

  5. SMiTTY says:

    Not useless! After you do the add-apt-repository, run apt-get update.

    Now Java should be listed via apt-cache search. To install simply do

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

  6. Joshua says:

    This also doesn’t work for me. I looked in the ubuntu software center and the synaptic package manager – but nothing seems to have changed….

  7. John Francis says:

    His instructions work perfectly on ubuntu 10.04 LTS:

    1) add-apt-repository “deb http://archive.canonical.com/ lucid partner”
    2) sudo apt-get update
    3) sudo apt-get install sun-java6-bin sun-java6-jre

  8. AMaineJR says:

    Awesome SMiTTY. Thanks for the tip. It still doesn’t show up in my synaptic, but finally the apt-get is finding it. I had the multiverse enabled, just didn’t know about these repos. Thanks again.

  9. anonymous says:

    There is also a way without using the terminal: http://ubuntuforums.org/showthread.php?t=1517979

  10. John Lehmann says:

    Seems like the path should be:
    sudo apt-get http://archive.canonical.com/ubuntu lucid partner

    That is the option in the “sources” menu.

  11. tommyboy says:

    Thanks for the instructions!!!

  12. Kevin says:

    Umm, his instructions only have line 1) of your instructions, which work.

  13. poyzzone says:

    Thanks for tip,… work fine in my machine, Ubuntu 10.04 (lucid) GNOME 2.30.2

  14. Logan says:

    Thanks man. It worked.

  15. عالم أوبونتو says:

    thx a lot brother

  16. WahWah says:

    Really with the caustic comments? Instructions are perfectly fine.

    You can verify it worked by nano /etc/apt/sources.list.d and look toward the bottom of the file and you’ll see the repositories being added. After you run apt-get update, the catalog of the new repository will now include sun-java6. after that you install sun-java6.

    How hard is that?

  17. SHASMOE SHASMOE says:

    you do the best bcoz you provide exactly the direction unselfishly, thanks.

Leave a Reply

(required)

(required)