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
  • 121
  • 3
  • 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 Jul 26 '18 at 09:24
  • @n8te that's a mistake, updated. Will check the symlink as you suggested. – LightningWar Jul 26 '18 at 09:32
  • 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`](https://docs.oracle.com/cd/E26502_01/html/E29031/dhcpmgr-1m.html) might get broken if it runs [into a backwards incompatibility](https://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html#A999387). 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 Jul 26 '18 at 21:46

0 Answers0