Starting with the release of JDK 9, Oracle's list of supported hardware architecture / operating system platforms for its Java SE implementation has been trimmed. No longer are 32-bit versions being provided, nor are binaries for the Arm architecture, including those for the wildly popular Raspberry Pi. However, work supporting the 32-bit armhf architecture is incorporated in the OpenJDK source including that for OpenJDK 10. So for all the Raspberry Pi / Java aficionados out there, you effectively have two options if you want the latest Java release for your device:
We'll discuss option (2) today, and with the resources available on the latest models of the Raspberry Pi, show that it is feasible to build Java from source right on your device.
For the impatient (which definitely includes this author), here are the instructions to get you going.
The aforementioned howto is divided into 7 relatively straightforward steps. Here are some of the more important considerations:
How long does it take to build?
Depending upon the quality of the SD card you use, your mileage will vary. In this instance, A 32GB SanDisk Extreme U3 SD card was used. The total time reuired to issue the make command was approximately 216 minutes, or a little more than 3 ½ hours.
And what about JavaFX?
As of Java 10's GA release, JavaFX is no longer part of the JDK distribution. To add this platform, you can either download a build of JavaFX that has been completed by the community, or build it yourself by following these instructions. Unfortunately at this time you cannot build OpenJFX natively on the Raspberry Pi device. You'll need to cross-compile the source from a supported development platfom, like for example, a Linux x64 system.
Since the creation of this article's original build instructions, JDK 10.0.1 has been released. You can build this version of Java in a very similar manner, but a few small changes need to be made, including locating and pulling down the appropriate JDK 10.0.1 update source code. The instructions contain a Postscript section which should aid in this endeavor.
As digital certificates are wont to do, mine was set to expire. The content for this article stems from a recent renewal experience... As it...