I’ll walk you through the process of installing Oracle JDK 7 on Ubuntu 12.04 LTS Precise Pangolin, the easy way. For this we will use the “install oracle-java7-installer” package from “WEBUPD8″.
The “install oracle-java7-installer” package from “WEBUPD8″ will download the official binaries from Oracle and install the JAVA 7 JDK, JRE and browser plugins on your machine.
1. Add the “WEBUPD8″ PPA.
danesh@python:~$sudo add-apt-repository ppa:webupd8team/java
2. Update your repositories.danesh@python:~$sudo apt-get update
3. Install JAVA 7 JDK.danesh@python:~$sudo apt-get install oracle-java7-installer
To uninstall,sudo apt-get remove oracle-java7-installer