installing jdk1.7.0 on Ubuntu 11.04 machine

Posted by Yogesh on Super User See other posts from Super User or by Yogesh
Published on 2011-12-17T04:19:24Z Indexed on 2012/10/02 3:43 UTC
Read the original article Hit count: 272

Filed under:
|
|

I am facing a problem while trying to install Java 7 on Ubuntu.

The following are the steps that I performed for installing:

I installed the setup file from the link given below:

wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-x64.tar.gz

  1. I have a file: jdk-7u1-linux-x64.tar.gz

  2. I Untared it:

    tar -xvf jdk-7u1-linux-x64.tar.gz

  3. sudo mv ./jdk1.7.0_01 /usr/lib/jvm/jdk1.7.0_01

  4. sudo update-alternatives –config java Here it gave me the following output:

    There is only one alternative in link group java: /usr/lib/jvm/java-6-sun/jre/bin/java Nothing to configure.

  5. sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_01/jre/bin/java 1(I entered 1 here.)

  6. sudo update-alternatives --config java

  7. java -version.

It showed the following output

java version "1.6.0_26"

Java(TM) SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

I am not sure if jdk1.7.0 is installed as its showing the version as 1.6.0_26.

© Super User or respective owner

Related posts about installation

Related posts about java