Java, remove older versions

Hi,

I’d like to use the Fixlet Java Runtime Environment - Multiple JRE Versions Installed - J2SE 1.4.2 and Up to remove all older versions of Java and only keep the latest one though I’d like to skip all older versions than Java JRE 1.8 (they have to stay installed).

Would you know what is the best way to implement this?

Thanks,
Raphael

I don’t deal with J2SE but here is how we uninstall older versions Java 8.
These are removing 8 u77, 92, 102 & 112. This is in the actions script prior to installing the new version.
waithidden MsiExec.exe /X {{26A24AE4-039D-4CA4-87B4-2F83218077F0} /qn
waithidden MsiExec.exe /X {{26A24AE4-039D-4CA4-87B4-2F83218092F0} /qn
waithidden MsiExec.exe /X {{26A24AE4-039D-4CA4-87B4-2F32180102F0} /qn
waithidden MsiExec.exe /X {{26A24AE4-039D-4CA4-87B4-2F32180112F0} /qn

2 Likes

And in case it’s not obvious, Oracle subverted the whole idea of GUIDs by making them sequentially match the JRE version -

8u77 = 26A24AE4-039D-4CA4-87B4-2F83218077F0
8u92 = 26A24AE4-039D-4CA4-87B4-2F83218092F0
8u102 = 26A24AE4-039D-4CA4-87B4-2F32180102F0
8u112 = 26A24AE4-039D-4CA4-87B4-2F32180112F0

so you can extrapolate what the GUID would be for each release. Cue minor rant…

1 Like