How to Install java on Ubuntu 10 and Ubuntu 11

Author posted by Jitendra on Posted on under category Categories JAVA, Linux and tagged as Tags , , with Leave a comment on How to Install java on Ubuntu 10 and Ubuntu 11
Run below command on the terminal of ubuntu to install the JAVA.
Ubuntu 10 :
	$ sudo add-apt-repository "deb http://archive.canonical.com/lucid partner"
	$ sudo apt-get update
	$ sudo apt-get install sun-java6-jdk
	$ sudo apt-get install sun-java6-jre

Ubuntu 11:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre
sudo update-alternatives --config java