The steps to install sun java as I did in my machine is as follows and it works fine ….

#chmod +x jdk-6u32-linux-x64.bin

#./jdk-6u32-linux-x64.bin

 

For java package of the format
jdk-6u32-linux-x64.tar.gz
Run the following command to unzip the zipped package
#tar –xvf jdk-6u32-linux-x64.tar.gz

 

#sudo mv jdk-6.0.32 /usr/bin/jvm

#sudo update-alternatives –install /usr/bin/javac javac /usr/lib/jvm/jdk-6.0.32/bin/javac 1

#sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk-6.0.32/bin/java 1

#sudo update-alternatives –install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6.0.32/bin/javaws 1

 

If you have other versions of java and the process of making the defaults java version is

#sudo update-alternatives –config javac

#sudo update-alternatives –config java

#sudo update-alternatives –config javaws

Advertisements