I have a Spring Boot application and I'm trying to set the JDK to OpenJDK-17. I've downloaded it from Java, then I go to IDE and Project Settings > Project Structure > SDKs, and then I click on the ' ' > Download JDK. Then when I set the version to 17, I don't see OpenJDK-17 anywhere...
I get the following options:
Amazon Corretto 17.0.6
Azul Zulu Community 17.0.6
BellSoft Liberica JDK 17.0.5
Eclipse Temurin (AdoptOpenJDK HotSpot) 17.0.5
GraalVM Community Edition 17
IBM Semeru (AdoptOpenJDK OpenJ9) 17.0.5
SAP SapMachine 17.0.5
---------Other Versions---------
Oracle OpenJDK 19.0.2
CodePudding user response:
OpenJDK is basically a source only project (though they do release reference binaries for the first six months, which usually results in three releases, e.g. 17.0.0 - 17.0.2). After those three months, newer releases are only available through the vendors (e.g. for Java 17.0.5). All those listed are variants of OpenJDK 17 (except IBM Semeru, which is OpenJ9, which itself is a variant of OpenJDK). And bar vendor specific extras, or optional features like garbage collectors, they are basically the same, and have been tested for compliance with the Java specification.
In the Java world, you pick a vendor, and use its binaries instead of the binaries from OpenJDK itself (which generally don't go further then x.0.2, while vendor specific versions continue to receive updates if they are LTS versions). Personally, I usually use Eclipse Temurin builds.
CodePudding user response:
I don't know for sure the rational of the Intellij for (no longer) including a link to a "vanilla" OpenJDK 17 download site. However my guess is that it is related to this notice on the https://jdk.java.net/17/ release page:
JDK 17 Releases
JDK 17 has been superseded. Please visit jdk.java.net for the current version.
Older releases, which do not include the most up to date security vulnerability fixes and are no longer recommended for use in production, remain available in the OpenJDK Archive.
Note that the OpenJDK team are no longer publishing new builds for OpenJDK 17. If you want the current Java 17 LTS build, you get it as an Oracle release or you get it from a 3rd-party vendor. These should all include the most recent security patches.
The Intellij team would be doing users a disservice if they provided an easy way for users to download an old and potentially insecure OpenJDK Java 17 build.