[Ubuntu] 00. How to install Oracle Java 7 (JDK) in Ubuntu 12.04 - achishis2/achishis2.github.io GitHub Wiki
Preparing your system
First you need to remove openjdk for this run the following command from your terminal
sudo apt-get purge openjdk*
sudo apt-get autoremove
If you installed java 7 from any other PPA and you are having problem with java then you have to do following steps before installing the PPA mentioned here
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
when apt-get is not working,
$ sudo vi /etc/apt/apt.conf
Acquire::http::proxy "http://168.219.61.252:8080/";
Acquire::https::proxy "https://168.219.61.252:8080/";
Install oracle java 7 in ubuntu 13.04/12.10/12.04
Open the terminal and run the following commands
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
You can check the java version by searching java in dashboard
http://www.ubuntugeek.com/how-to-install-oracle-java-7-in-ubuntu-12-04.html