jdk installation - update environment?

Hi,

i have installed jdk 1.6 successfully but when i issue command

 
java -version

it shows me old version how to handle it.

kindly help

Is it the one which you are trying to see is install with the operating system and not the open which you have install.

Sounds like a simple PATH issue.

Update your PATH environmental variables in your profile and you should be OK.

Hi,

bash-3.00# which java
/usr/bin/java

bash-3.00# ls -al /usr/bin/java
lrwxrwxrwx   1 root     other         16 May 14 15:32 /usr/bin/java -> ../java/bin/java

Look at the /usr/java link and change it to the new version:

lrwxrwxrwx   1 root     other         15 May 14 15:39 java -> jdk/jdk1.5.0_22

/usr/java/jdk/latest should already be pointing to the latest version if your install went fine.

That's what we always do when moving to a different java. Also, the back-out is really faster.

Hope it helps :slight_smile:

Don't do this. It is the wrong way to access the current version of java. There are known performance problem in JDS and some other standard applications when you do this. The system-wide default should be left the way it is and as neo said the PATH should be updated as required, or the full path used.