OpenJDK Migration Book Review
October 04, 2023Azul recently released the free OpenJDK Migration book. Migrating from one Java vendor to another has never been easier thanks to this book, written by Simon Ritter, Deputy CTO at Azul Systems.
The book explains why you should consider migrating, how to migrate your applications and how to select an appropriate vendor.
Oracle's licensing changes
In the past most companies used the Oracle JDK or in some cases the IBM JDK, the latter mainly when using IBM WebSphere. Nowadays many organizations provide Java binaries such as Eclipse Temurin, Azul's Zulu, Amazon's Corretto, Alibaba's DragonWell, Microsoft OpenJDK, Bellsoft's Liberica, SapMachine and GraalVM. This makes it easier to pick another runtime based on the needs of the organization.
Unfortunately most developers and operations aren't really aware about the differences between the Oracle JDK and other JDKs. Actually the basis of all the JDKs is the same, as long as your project only uses those features, you should be able to run it on any runtime.
For quite a while, that meant that organizations simply kept using the Java runtime they used in the past, often the Oracle JDK. Unfortunately, in recent years Oracle changed their licensing policy several times. The latest version means that you pay a fee for every employee within the organization.
If you have a cleaning organization with one thousand cleaners and ten developers, you pay the license fee for one thousand and ten employees. Depending on how you read the license, you even need to pay for the employees of your suppliers, however make sure to consult a legal advisor to get the details clear. The book explains the Oracle license and how to replace the Oracle JDK in the first chapter.
Preparing and executing the migration of your applications
After that, the book dives into actually preparing and executing the migration of your applications. The recommendation is to inventorize all Java runtime installations with the help of the provided templates. Various types of information should be collected such as the different Java versions, third party software, whether specific operating systems or Docker are used and the usage of some edge cases such as Lucida fonts and Windows registry keys. The book also explains how to run applications on another runtime and which migrations can be executed without code changes.
Then the book looks at evaluating the different OpenJDK vendors, while also answering questions such as "Will I need to rewrite or modify my application code". One of the chapters is dedicated to commercial support, something to consider when switching to another vendor. The benefits of paying OpenJDK distribution vendors, compared to using free OpenJDK alternatives are explained.
Personally I really recommend the book, it's easy readable, free and it contains quite some relevant information which isn't widely known among developers. Information about items like TCK testing, Critical Patch Update (CPU) versus Patch Set Update (PSU), differences between JDKs and commercial support features isn't widely spread.
Make sure to take all the options into account
I really like the book as it provides great content, the only downside is that the book shows a stark preference for migrating to Azul's JDK. Of course, that's understandable as they wrote and provided the book for free.
However, when you consider moving from one vendor to another, make sure to take all the options into account. As each vendor has some unique pros and cons, for example Eclipse Temurin is supported by multiple organizations making it less dependent on one company for its development. Another option, which is quite unknown, would be to use GraalVM as a runtime, so instead of using GraalVM to compile native images, you simply replace your runtime with a GraalVM runtime, which might result in performance improvements.
As an organization, look at your requirements; what type of (external) support do you want, what are the performance requirements, do you want to use only LTS releases or any release, do you want to use Docker images or installers for specific operating systems, do you want a plain runtime or do you want extra functionality for example for JavaFX, etcetera. That way you can evaluate the different vendors on those requirements and see which one scores the most points.
If you're interested, you can download the book for free, or have a look at the other free migration resources which Azul provides on their website.