I was asked two days ago on how to install Java in Ubuntu 10.04 LTS, and to my surprise, it no longer installs with a simple sudo apt-get install sun-java6-jre like it did in versions 9.10 and 9.04.

For those not in the know, Java is an application which is required for some games, such as MineCraft and Dust, some programs such as Project Wonderland and ThinkFree Office. And to make matter even worse…
when you try looking for Sun Java in Synaptic, you quickly find out that it has completely vanished.

So where has it gotten to? Well the answer to that lies in the release notes. For those that don’t want to bother reading them, I’ll tell you: they removed it to a partner repository. So to install it, you need to add the repo and download from there. If you follow the instructions I posted yesterday, you can add the repository which is:
deb http://archive.canonical.com/ lucid partner
Or if you’d rather run this all in one step, the adding and the installing of Sun Java, open the terminal and copy and paste this one line command:
sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner” && sudo apt-get update && sudo apt-get install sun-java6-jdk -y
This will add the repository, refresh the repos, and install Sun Java for you. Now, you might ask, what do they have in the repos instead that’s so bad that we have to go though all this? Well, the official repos that are installed by default have the IcedTea, or what’s more commonly known as the OpenJava. While it too, deserves it’s own right for being a decent Java clone, in this case, the non-Open Java does a better job. I’ve personally experienced lockups and freezes using OpenJava/IcedTea. If you wish to use it, go right ahead, that was why they included it by default, for those who want to use it.
Related posts: