How do I get Java Runtime for Ubuntu 10.04?

Asked by Tom Marzolf on 2011-12-28

I'm running Ubuntu for the first time on my Mac. To install a tool I need a plug-in (and probably more) in JRE. Is JRE in one of the available packages ready for installation or must I download from Sun/Oracle? Can I run the latest JRE with 10.04?

Question information

English Edit question
Ubuntu sun-java6 Edit question
No assignee Edit question
Solved by:
Tom Marzolf
Last query:
Last reply:

You can install Java Runtime by adding the repository and installing it from there. Type the following commands in a Terminal

sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6

That should setup Java 6 for you. Hope that helps

Tom Marzolf (9nc) said : #2

Thanks, Jean.

I followed your instructions. The first two instructions appeared to work fine. On entering the third, I got the following message: "E: Couldn't find package sun-java6" (after successfully reading package lists, building dependency tree, and reading state information).

The PPA seems to be outdated already. Have a look at this How To thread in Ubuntu Forums The instructions are comprehensive and will guide you to installing Sun Java 6.

Alternatively, you can also install OpenJDK instead of Oracle/Sun Java. It is fully supported by Ubuntu and can be found via Synaptics.

Tom Marzolf (9nc) said : #4

Thanks again.

I went to the "how to install ..." instructions you suggested ( They are short and sweet and I had no trouble following them. However, when in the final step I clicked on 'Install' I got another "Package does not exist" message. The Details show further: "Package sun-java-plugin isn't available"

I am running Ubuntu on a Mac. Could that be an issue here?

Hi Tom, it should be sun-java6-plugin. Did you typed it correctly?

Tom Marzolf (9nc) said : #6

Actually I didn't type it. In the second and last step of the process from the site, "Sun Java 6.0 Plugin" is highlighted at the top of the screen, just as the site shows. It includes an 'Install" button. I just clicked on the button.

Now that the installation has failed the 'Install' button is no longer displayed.

Perhaps I can accomplish the installation by issuing a command explicitly?

Chris (fabricator4) said : #7

Oracle have revoked the license for Canonical (or anyone) to distribute Java code.

Note the important bit down the bottom of that article: there are security issues with the code. The code that you can still download from the partner repository is actually an update that will disable Java. You should just install OpenJDK which is freely available from the repositories.

You _could_ download Java 6 from the oracle web site and install that, but there's really no need and it's contrary to advice from Canonical.


Yes, I agree with Chris. If it seems there's no specific application that requires what you're doing to run on Oracle Java, then you might want to install OpenJDK straight from Synaptics or from the Ubuntu Software Center.

Tom Marzolf (9nc) said : #9

I reinstalled Linux and a friend installed Java successfully using the Package Manager so I have now gotten past my problem.

Thanks Jean and Chris for the help.