Ubuntu – Oracle Java Virtual Machine install

javasoftware installation

I cant get it install and I need it running for a job application i need to put in online.

jre-7u51-linux-i586.tar.gz

that's the file and every time I try to install it wont complete, says cannot find file.

Best Answer

You can use

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

This will install Oracle JVM and will update it when needed.

But if you want to install JVM manually, you should use these commands:

tar -xzf jre-7u51-linux-i586.tar.gz
sudo mv jre1.7.0_51/ /usr/lib/jvm/jre1.7.0_51

Then run

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0_51/jre/bin/java

and

$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                       Priority   Status
--------------------------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java    1061      auto mode
  1            /usr/lib/jvm/ia32-java-6-sun/jre/bin/java   63        manual mode
  2            /usr/lib/jvm/java-6-openjdk/jre/bin/java    1061      manual mode
  3            /usr/lib/jvm/java-6-sun/jre/bin/java        63        manual mode
  4            /usr/lib/jvm/jre1.7.0_51/jre/bin/java       4         manual mode  

Press enter to keep the current choice[*], or type selection number:

Follow the instructions on screen. Your numbers would be quite different from mine.

Related Question