IBM’s silent installer for SPSS Statistics is a binary file that requires a Java JDK to be installed on a client before it can be run. It is bizarre that this is the case, since the SPSS Statistics application includes an embedded Java Runtime Engine (JRE) that could trivially be included in the installer by the developers, but that’s another story.

The installer is run as follows, allowing installation preferences to be pre-defined in an installer.properties file:

/path/to/SPSS_Statistics_Installer.bin -f /path/to/installer.properties

If the binary detects Java, the following output is generated:

/Volumes/SPSS_Statistics_25_Installer/SPSS_Statistics_Installer.bin

Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

No “completed” message is outputted, but the installation proceeds successfully.

SPSS Statistics 25 and OpenJDK 11 - all good

I previously reported about the changes to Oracle’s Java licensing that prevent use of Java SE 8 except for personal and development use. AS per the new license FAQs:

If you are using Java on a desktop or laptop computer as part of any business operations, that is not personal use.

This has led many to migrate to various versions of OpenJDK.

At the time, I tested the SPSS Statistics silent installer (version 25) with the current AdoptOpenJDK 11. It worked. Sigh of relief.

SPSS Statistics 26 and OpenJDK 11 - nope

Shortly afterwards we received version 26 of SPSS Statistics from our suppliers. We ran the AutoPkg recipe, a package was generated and uploaded to our Jamf Pro server, and I ran the installer from Self Service.

Nothing got installed. Hmm.

So I ran the supplied SPSS_Statistics_Installer.bin manually from the command line:

/Volumes/SPSS_Statistics_26_Installer/SPSS_Statistics_Installer.bin

Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
No Java virtual machine could be found from your PATH
environment variable.  You must install a VM prior to
running this program.

Huh? The same version of Java is still installed on the device. Let’s check:

$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)

The installer binary is failing to detect that Java is present, but since there is a Java installed, we don’t get the popup prompt from macOS telling us that there’s no Java.

I removed OpenJDK 11. This time, we got the expected popup prompt when running the SPSS installer, as well as the identical error message:

img-1

(interestingly, the “More info…” button still directs you to the official Java download page, which contains a link to the version of Java you are most likely not licensed to install…)

Seems pretty clear that the SPSS 26 installer ignores any new JDK. Weird since the previous version did, but perhaps they inadvertently introduced a hard-coded version check?

SPSS Statistics 26 and OpenJDK 8 - we are good again

I decide to add AdoptOpenJDK 8 to our Jamf Pro servers and install it from Self Service:

$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)

Trying the SPSS installer again:

/Volumes/SPSS_Statistics_25_Installer/SPSS_Statistics_Installer.bin

Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...

Launching installer...

Bingo! So, I just need to make sure a JDK 8 is on the device before running the installer.

SPSS Statistics 26 with OpenJDK 8 and 11 concurrently installed - no go!

Sadly it’s not that simple. What if OpenJDK 11 is already on the device and I install OpenJDK 8 to facilitate the installation of SPSS? Sadly, SPSS will fail to find that Java 8 is installed - I suspect it is using the environment variable JAVA_HOME, which defaults to the newest version.

Please make it work!

To ensure that SPSS Statistics 26 can get installed, you have to do one of the following:

  1. Check for and delete any newer JDK, or move its folder away from /Library/Java/JavaVirtualMachines.
  2. Manually change the JAVA_HOME environment variable, e.g.
$ /usr/libexec/java_home -V   
Matching Java Virtual Machines (2):
    11.0.3, x86_64:	"OpenJDK 11.0.3"	/Library/Java/JavaVirtualMachines/jdk-11.0.3+7/Contents/Home
    1.8.0_212, x86_64:	"OpenJDK 8"	/Library/Java/JavaVirtualMachines/jdk8u212-b03/Contents/Home

$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_212)

$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b03)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)

Either of these methods will ensure that SPSS Statistics 26 will install on the client.

Conclusion

It is non-trivial engineering work to build a safe workflow that detects and move/removes any Java JDK newer than version 8 from the device, installs version 8, runs the SPSS silent installer, and then removes Java 8 and replaces the Java that was previously in place on the client.

I have reached out to IBM Analytics Support regarding the issue, and they stated that this is a known issue, and the workaround is to install Oracle Java SE 8 (212) when running the installer, until a fix is released. I pointed out that we are no longer licensed to use Oracle Java 8 SE 212, and that the installation will regardless fail if a newer Java version is already installed on the client. The case is being updated as a result - hopefully a fix will be quickly forthcoming.

If any software developers are reading this, please try to ensure that your software installer does not have dependencies. If they absolutely must, it is your responsibility to stay up to date with the releases of those dependencies and ensure that your products are compatible.