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 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.
  • Really helpful for beginner Users..thanks

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

  • Pingback: How to Install Sun Java on Ubuntu 10.04 LTS « AccessTech News()

  • Pingback: How to Install Sun Java on Ubuntu 10.04 LTS « The BAT Channel()

  • newToThis

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

  • command add-apt-repository “deb lucid partner”
    does nothing.

    Useless post 🙁

  • Thanks dude!

    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

  • SMiTTY

    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

  • Joshua

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

  • His instructions work perfectly on ubuntu 10.04 LTS:

    1) add-apt-repository “deb lucid partner”
    2) sudo apt-get update
    3) sudo apt-get install sun-java6-bin sun-java6-jre

  • AMaineJR

    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.

  • anonymous

    There is also a way without using the terminal:

  • John Lehmann

    Seems like the path should be:
    sudo apt-get lucid partner

    That is the option in the “sources” menu.

  • tommyboy

    Thanks for the instructions!!!

  • Kevin

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

  • poyzzone

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

  • Logan

    Thanks man. It worked.

  • thx a lot brother

  • WahWah

    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?

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

  • Hussain

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