Installing sun (oracle) jdk in precise pangolin..

Finally, after doing many things unsuccessfully,

this method works for me:

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 
sudo add-apt-repository ppa:webupd8team/java 
 sudo apt-get update 
sudo apt-get install oracle-java7-installer