I have only selected to talk about ones that are actually free in production, other like Red Hat JDK are free but only for development, for production you need a support agreement with Red Hat. This does not mean that it would not be a good choice for you, especially if you already have a support agreement with Red Hat, but I am focusing on free as in beer. The alternatives I will talk about are the following:
- Amazon Corretto (https://aws.amazon.com/corretto/)
- Azul Zulu (https://www.azul.com/products/zulu-community/)
- AdoptOpenJDK (https://adoptopenjdk.net/)
- OpenJDK (https://openjdk.java.net/)
The first thing that should be noted when talking about these alternatives is that they all build on the same source code. They are all based on the OpenJDK project so there are no feature differences between the distributions. What varies is what parts are built into the distribution, platforms, release cycle and installers.
Amazon Corretto | Azul Zulu | AdoptOpenJDK | OpenJDK | |
---|---|---|---|---|
Versions Available | LTS versions, currently Java 8 and 11. | LTS versions and latest version of java, currently Java 8, 11 and 13. | All versions of Java from 8 and on. | All versions of Java from 8 and on. |
Platforms Supported | Windows (x86, x64), Linux (x64, aarch64), macOS (x64) | Windows (x86 64-bit), Linux (x86 64-bit, ARM 64/32-bit), macOS (x86 64-bit) | Windows (x86, x64), Linux (x64, arm32, aarch64, ppc64le, s390x), macOS (x64), AIX (ppc64) | Build it yourself and it will (likely) work. |
Docker Support | Yes, Linux only. Smallest image is around 250MB. | Yes, Linux only. Smallest image is around 55MB. | Yes, there are images for all platforms including windows. Smallest image is around 80MB. | You can build your own docker image. |
Installers | MSI, PKG, RPM, Deb and ZIP/Tar | MSI, DMG, RPM, Deb and ZIP/Tar | MSI, PKG and ZIP/Tar | Zip/Tar |
Support | Available via AWS Support Plan. | Can be purchased with Azul. | Can be purchased with IBM. | No Support. |
Release Cycle | Quaterly with possible out of cycle releases for serious issues (e.g. security). | Quaterly. | Quaterly. | When ever you build a new release. |
Components | No OpenJFX included. | OpenJFX downloaded and installed separately. | No OpenJFX included. | OpenJFX needs to be built separately. |
I've mainly included the OpenJDK column to show what these distributions are doing for you. I would not expect that you actually build from the source unless you have some very specific needs (and remember, if you do that, all changes you make need to be contributed back to the project). As you can see there is generally not that much difference between the distributions, unless you need a specific platform that happens to be only available in one distribution. For production you should only run one of the LTS versions (currently 8 and 11, next one is 17) so unless you plan on going into production in a couple of years then it doesn't really matter if the latest release of Java is available. I would recommend that you select the Azul Zulu distribution as it is the most versatile in terms of available versions, release cycle and has excellent Docker support. Also if need be you can purchase support. The exception being that if you go on AWS then you might just as well take Corretto.