Setting java path in Linux
Hi,
I have installed Java 7 using rpm file: jdk-7u17-linux-x64.rpm, with the help of below command on my linux box:
rpm -ivh jdk-7u17-linux-x64.rpm
After completing the installation the java is installed in location "/usr/java/jdk1.7.0_17", when I try to find the jave version I am getting different result:
-------------
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.41.1.10.4.el6-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
----------------
It is still pointing to 1.6 which was installed on my linux box earlier. How can I make sure that the java command uses the latest installed JDK 7?