i unzipped the file using tar command .once i created the softlink for it ,i should be able to see java version and all but which in this case i'm not able to see
You might have extracted the jdk-7-linux-x64.tar.gz file to the "jdk" directory. Now, inside this directory, you will find a directory called "bin". And the "java" binary would resides at this location.
So, add the below lines to the file ~/.bash_profile file with the logged in user (in our current scenario abhishek).
export JAVA_HOME=$HOME/Desktop/jdk export PATH=$JAVA_HOME/bin:$PATH
Save the file and run the below command at the command prompt.
$ cd $ . .bash_profile
Now, run the below commands for knowing where from the java is being picked
$ which java $ java -version
yum install java-1.7.0-openjdk-devel
and then do,
For more inputs, refer redhat manual