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
![]()
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.









Really helpful for beginner Users..thanks
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 http://archive.canonical.com/ lucid partner”
does nothing.
Useless post
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
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
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 http://archive.canonical.com/ lucid partner”
2) sudo apt-get update
3) sudo apt-get install sun-java6-bin sun-java6-jre
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.
There is also a way without using the terminal: http://ubuntuforums.org/showthread.php?t=1517979
Seems like the path should be:
sudo apt-get http://archive.canonical.com/ubuntu lucid partner
That is the option in the “sources” menu.
Thanks for the instructions!!!
Umm, his instructions only have line 1) of your instructions, which work.
Thanks for tip,… work fine in my machine, Ubuntu 10.04 (lucid) GNOME 2.30.2
Thanks man. It worked.
thx a lot brother
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.