How to install and Configure java 7 on ubuntu 12.10 and ubuntu 12.04

we can see the way to install Oracle java seven on ubuntu 12.10 and 12.04

Installing Oracle java seven on ubuntu 12.12 and 12.04
Step one » Check the version of java package put in by supplying the below command

  1. sudo update-java-alternatives -l
  2. java-1.7.0-openjdk-i386 1051 /usr/lib/jvm/java-1.7.0-openjdk-i386

Sudo java -version
java version "1.6.0_24"
OpenJDK Runtime atmosphere (IcedTea6 one.11.1) (6b24-1.11.1-4ubuntu3)
OpenJDK consumer VM (build twenty.0-b12, mixed mode, sharing)

The results shows openjdk is put in on your machine .

Step Two » take away openjdk by typewriting the below command .
 sudo apt-get purge openjdk*

Step three » Issue the below command to feature webupd8 repository.
sudo add-apt-repository ppa:webupd8team/java

Step four » update the repositories
sudo apt-get update

Step five » currently install Oracle java7 by supplying the below command.
 sudo apt-get install oracle-java7-installer

Step half-dozen » That’s it, currently check the version
java -version
java version "1.7.0_09"
Java(TM) SE Runtime atmosphere (build one.7.0_09-b05)
Java HotSpot(TM) consumer VM (build twenty three.5-b02, mixed mode)

sudo update-java-alternatives -l
java-7-oracle one /usr/lib/jvm/java-7-oracle

Oracle Java7 is put in on ubuntu twelve.04.