Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting java path in Linux

kumar_1302Apr 17 2013 — edited Apr 17 2013
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2013
Added on Apr 17 2013
1 comment
914 views