JDK installation command:
sudo apt-get install SUN-JAVA6-JDK
sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin
*************************************************************************************
Problems that may arise:
1 Package sun-java6-jdk is not available, but are referred to by another Package.
2 E:package SUN-JAVA6-JDK has no installation candidate ************************************************************* ************************
Solution when unable to install:
SETP 1.
Add Source:
Deb Http://archive.canonical.com/lucid Partner
Deb-src http://archive.canonical.com/lucid partner or
sudo add-apt-repository "Deb http://archive.canonical.com /lucid partner "
Step 2.
Add Source:
Deb Http://us.archive.ubuntu.com/ubuntu/hardy multiverse
************************************
Set JDK environment variable
sudo gedit/etc/profile
Add code:
#s ET Java Environment
Export java_home=/opt/jdk1.6.0_20
Export jre_home= $JAVA _home/jre
Export classpath= $CLA Sspath: $JAVA _home/lib: $JRE _home/lib
Export path= $PATH: $JAVA _home/bin: $JRE _home/bin
Save exit.