As part of the research for this, I was looking at one of the options for jlink that allows you to select a virtual machine type, the idea being to reduce the size of the runtime even further. According to the documentation, this is only available for 32-bit versions of the JDK, which Oracle no longer provide for JDK 9 and later.
Azul does provide 32-bit binaries of JDK 9 for Windows and Linux so I thought I would test the option on our Zulu build of the OpenJDK. For things like this, I keep a selection of old Windows images available via VirtualBox (I even have a Windows 2000 image as my son wanted to play an ancient game that wouldn’t work on newer versions).
I fired up Windows XP, downloaded Zulu 9 and ran the usual quick test of
java -version. Low and behold it wouldn’t work. I got an error message that told me that java.exe was not a valid Win32 executable. After checking I’d downloaded the right version I tried Zulu 8. That worked fine.
I assumed we had a build problem so quickly dispatched a message to our engineering team responsible for these builds. It turns out that Windows XP is now just too old for JDK 9. (When I was using XP, I was presented with a useful message informing me that Windows XP would no longer be supported from April 2014!)
As part of the natural order of things when building Zulu 9 for Windows, we had switched from Visual C++ 2010 to the more modern Visual C++ 2013. Because of changes in the way the compilers work to support Windows XP it would be necessary to use Managed Multi-Targeting. To simplify our build procedures, we don’t do this, which is why Zulu 8 would work on Windows XP, whereas Zulu 9 won’t.
I suspect that the number of people looking to run Java SE 9 applications on Windows XP has to be in the range of one: me, and then only for testing. The good news is that Zulu 9 will work quite happily on Windows 7 (and later versions) in both 32 and 64-bit variations.
If you need Windows or Linux 32-bit (or Mac OS X) versions of JDK 9 (and soon JDK 10) you can find them on our website.