0

In the official website for download I can see two links for JDK for Linux.

Which one should I choose on my Ubuntu 12.04 ?

http://javadl.sun.com/webapps/download/AutoDL?BundleId=78694

or

http://javadl.sun.com/webapps/download/AutoDL?BundleId=78695

2

The .rpm file is not for Ubuntu, but for Fedora, CentOS, and other distros based on Fedora.

You'd want to download the .tar.gz file. To install Java in Ubuntu 12.04, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

And after the installation finishes, if you wish to see if it was successful, you can run the following command:

java -version

Or if you want to download the file , then see How to install a .tar.gz (or .tar.bz2) file

Source:WebUpd8

3
  • 1
    I strongly suggest using the installation method with the webupd8team's Java PPA, rather than messing with the .tar file. – Thomas Ward Aug 11 '13 at 16:48
  • @ThomasW. I do agree, but I like to give options. +1 – Mitch Aug 11 '13 at 16:49
  • Yep, just putting my two-cents out there for the O.P. of the question, though :) – Thomas Ward Aug 11 '13 at 16:50
1

Simplest method to install any application (including jdk) is to use the software centre or the add/remove programs..just search for jdk in the software centre.

1
  • I agree with Aditya. I've been manually installing and using Oracle's (Sun's) JDK in Ubuntu for years, but OpenJDK is good enough now, that I don't bother with the manual install anymore. Just install OpenJDK from the software center, and it will do all the messy setup and configuration for you. (You don't have to mess with external PPAs either). – PJ Singh Aug 11 '13 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.