First we have to download java jdk from the main website !!
// I have it downloaded alrady in my descktop
then we have to extract it into the /tmp folder !!
then open the terminal to do the following
first we log into root
if [ ! -d ‘/usr/lib/jvm’ ]; then mkdir /usr/lib/jvm; fi
jdk1.8* = replace it with the name of the extracted folder in this example =jdk1.8.0_05
mv /tmp/jdk1.8* /usr/lib/jvm/
java,javac,jar,javaws = we replace only these