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.

Sanjeev Mishra is a professional blogger and an Internet Marketing Consultant based in India. He has built the Internet Techies to provide you updates in technology and web application area.

21 Comments

  1. nimo

    May 28, 2010 at 8:41 am

    Really helpful for beginner Users..thanks

  2. Pingback: How to Install Sun Java on Ubuntu 10.04 LTS | Ubuntu-News - Your one stop for news about Ubuntu

  3. Pingback: How to Install Sun Java on Ubuntu 10.04 LTS « AccessTech News

  4. Pingback: How to Install Sun Java on Ubuntu 10.04 LTS « The BAT Channel

  5. newToThis

    June 17, 2010 at 12:47 am

    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 ???

  6. sanjay

    June 22, 2010 at 11:19 am

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

    Useless post :(

  7. Thanks dude!

    June 23, 2010 at 6:34 pm

    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

  8. SMiTTY

    June 28, 2010 at 8:12 pm

    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

  9. Joshua

    June 29, 2010 at 11:53 pm

    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….

  10. John Francis

    July 2, 2010 at 10:25 am

    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

  11. AMaineJR

    July 3, 2010 at 6:17 am

    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.

  12. anonymous

    July 8, 2010 at 2:54 am

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

  13. John Lehmann

    July 9, 2010 at 6:28 pm

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

    That is the option in the “sources” menu.

  14. tommyboy

    December 7, 2010 at 1:39 am

    Thanks for the instructions!!!

  15. Kevin

    January 16, 2011 at 8:58 pm

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

  16. poyzzone

    January 18, 2011 at 1:36 am

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

  17. Logan

    February 20, 2011 at 9:57 am

    Thanks man. It worked.

  18. عالم أوبونتو

    March 6, 2011 at 11:01 pm

    thx a lot brother

  19. WahWah

    November 15, 2011 at 9:53 pm

    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?

  20. SHASMOE SHASMOE

    March 27, 2012 at 11:41 pm

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

  21. Hussain

    May 27, 2012 at 6:42 am

    It worked for me. I then used jdk to be used in NetBeans 7.x. Thank you

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>