How do I get Java Runtime for Ubuntu 10.04?

Asked by Tom Marzolf

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

Language:
English Edit question
Status:
Solved
For:
Ubuntu sun-java6 Edit question
Assignee:
No assignee Edit question
Solved by:
Tom Marzolf
Solved:
Last query:
Last reply:
Revision history for this message
J. Austin Rodriguez (jeanaustinr) said :
#1

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

Revision history for this message
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).

Revision history for this message
J. Austin Rodriguez (jeanaustinr) said :
#3

The PPA seems to be outdated already. Have a look at this How To thread in Ubuntu Forums http://ubuntuforums.org/showthread.php?t=1517979. 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.

Revision history for this message
Tom Marzolf (9nc) said :
#4

Thanks again.

I went to the "how to install ..." instructions you suggested (http://ubuntuforums.org/showthread.php?t=1517979). 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?

Revision history for this message
J. Austin Rodriguez (jeanaustinr) said :
#5

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

Revision history for this message
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?

Revision history for this message
Chris (fabricator4) said :
#7

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

http://www.omgubuntu.co.uk/2011/12/java-to-be-removed-from-ubuntu-uninstalled-from-user-machines/

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.

Chris.

Revision history for this message
J. Austin Rodriguez (jeanaustinr) said :
#8

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.

Revision history for this message
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.

Tom