Update Java version, Solaris 10

2

I'm trying to update Java version on Solaris 10. I have downloaded a tarball jre-8u73-solaris-x64.tar.gz. Using these commands:

which java
/usr/bin/java

gzip -dc jre-8u73-solaris-x64.tar.gz | tar xf - 
java -version
java version "1.6.0_65"

The version shown is the old version, 1.6.0_65.

What command am I missing?

LightningWar

Posted 2018-07-26T09:03:51.330

Reputation: 121

Check the output of ls -l /usr/bin/java. It should be a symbolic link pointed to the old version of java. You'll want to point it to the new one you just unpacked. – n8te – 2018-07-26T09:24:56.933

@n8te that's a mistake, updated. Will check the symlink as you suggested. – LightningWar – 2018-07-26T09:32:26.787

1

Be careful changing the links in /usr/bin, especially if you do something as drastic as replace Java 6 with Java 8. Something in the OS that uses Java such as dhcpmgr might get broken if it runs into a backwards incompatibility. You're best served just placing the new JRE directory adjacent to the original OS-installed version and explicitly setting your PATH and/or JAVA_HOME envvals to use the updated version.

– Andrew Henle – 2018-07-26T21:46:10.287

No answers