javajava-17adoptopenjdkcorrettoredhat-openjdk

Does the security version and vendor of the JDK affect deployment?


I have a jar that was compiled using Amazon Corretto 17.0.9.8.1. Can I deploy it using any vendor's 17.0.x java binary? Or do I have to use a binary from the same vendor with the same security version to deploy it without issues?


Solution

  • Yes, any app built with a JDK that complies with a particular version of the Java specifications will run on any other JDK/JRE implementing the same version.

    And likely later versions as well, with rare exceptions.

    So, for example, you could build your app using Amazon Corretto 17.0.x, then run that app on Eclipse Adoptium Temurin 17.0.x. And some other user could run with Azul Systems Zulu 17.0.x.

    You may choose to obtain a JDK from vendors including BellSoft, Adoptium, Amazon, SAP, Oracle, IBM, Red Hat, Microsoft, and more. Be sure to study the terms of each product.

    If building a JavaFX app, you may want to use a JDK/JRE bundled with the OpenJFX libraries. At least two vendors provide such an edition of their products: Azul Systems and BellSoft.

    You may choose to bundle a JVM with your app. See the jlink and jpackage tooling to assist you.