Install Java 7 on Ubuntu 10.04 now that apt-get no longer works

Posted on Saturday, February 25, 2012

Installing Java 7 on Ubuntu 10.04

Looks like Oracle has finally pulled the plug on using apt-get to install Java6.  According to this site [1] the java package will no longer be available for easy apt-get downloads...

I used to be able to 

Edit /etc/apt/sources.list.

      > sudo pico /etc/apt/sources.list

Add the following at the bottom

deb lucid partner

Run this from the command line

      >    sudo apt-get update

      Run this from the command line to install Java

      >    sudo apt-get install sun-java6-jdk

But that no longer works...  Here are the steps I tool to install Java7 on my Ubuntu server.

Go to 

And click on Download

Click on the “Accept License” Button  then click on the version you want to download.

Once you accept the license you can right click on the download and copy the link, which I did so that I then could use wget from my Ubuntu server

(this is the 32 bit version)

      >    wget

Untar it

      >  tar -xvf jre-7-linux-i586.tar.gz

Move JRE folder to /usr/lib

      >    sudo mkdir /usr/lib/jvm
      >    sudo mv jre1.7.0_03 /usr/lib/jvm/jre1.7.0_03


      >  sudo ln -fs /usr/lib/jvm/jre1.7.0_03/bin/java /usr/bin/java

Now if you run 

      >  java -version

You should get the correct response

[1]  Java Packages in Partner archive to be removed 2012-02-16

       Visited 2/2012

1 comment: