Live data from Hacker News

Which version of JDK should I use?

whichjdk.com

11–20 of 258 posts

Re: Which version of JDK should I use?

#11
post #4

Yeah I agree we should be using 17 except Gradle still does not support it, despite having been out for an entire month... https://docs.gradle.org/current/userguide/compatibility.html

Isn't that kind of thing you'd expect using Gradle? It's not the first time it happened, they have been late to the party for a lot of the recent releases.

Re: Which version of JDK should I use?

#12
I think this advice only applies to the end users of the JDK and libs, e.g. people who develop webapps. We maintain an OSS library and plan to support JDK 8 for as long as possible (though some of our dependencies made a move to JDK 11 and most likely we'll have to follow suit). With this approach, our libraries can be used by developers under JVM 8, 11, or 17.

Re: Which version of JDK should I use?

#13
post #2

For those of us supporting more than a few legacy apps, use the oldest version (7 in our case) because then there's less chance of things going wrong (depends, of course, whether you bill per support call or a fixed annual fee).

I don't understand this way of thinking, do you also run RHEL 4 on your servers?

Re: Which version of JDK should I use?

#15
post #7

What is this naming? Embarrassing levels of bad "Adoptium Eclipse Temurin OpenJDK "

Adoption is the project umbrella under the Eclipse Foundation. Temurin is the project. OpenJDK is the artifact. https://projects.eclipse.org/projects/adoptium > The mission of the Eclipse Adoptium Top-Level Project is to produce high-quality runtimes and associated technology for use within the Java ecosystem. We achieve this through a set of Projects under the Adoptium PMC and a close working partnership with extern…

https://adoptium.net/ "Eclipse Temurin is the name of the OpenJDK distribution from Adoptium."

Eclipse Temurin 17 or Temurin JDK 17 should be sufficient.

Re: Which version of JDK should I use?

#16
I wish there were a section like this one in every tools' home/download page.

A section called "For production use this" or "if you don't know what you're looking for, use this". And "this" can be a particular version (Ubuntu 20.04.6) or a rule of thumb (for production, always use x.y.1 version or above).

Or it can be a table like this one. Django is, as it is in many fields, the gold standard in this regard.

It gets confusing sometimes. Yesterday I was trying to update the python version of one of my applications and was wondering; should I do it now, or do I need to wait for 3.10.1? I did it anyway because the app barely gets traffic anyway, but more clarity is always welcome.

Re: Which version of JDK should I use?

#17
post #4

Yeah I agree we should be using 17 except Gradle still does not support it, despite having been out for an entire month... https://docs.gradle.org/current/userguide/compatibility.html

Technically it's the Groovy runtime that doesn't support 17 (or specifically, JVM bytecode v62+) yet. And then only because it seems to do an explicit whitelisted-version check during some buildscript static-analysis bootstrap phase.

If you switch your Gradle buildscript files over to being written in Kotlin, the problem goes away, as Kotlin's runtime doesn't seem to use any similar explicit checks.

(Doing so also allows you to go further and test out EA JVM builds, e.g. Project Loom, which Groovy-based buildscripts have never been, and will never be, happy with.)

Re: Which version of JDK should I use?

#18

It really is quite incredible what a mess has made of the clear stability of Java and what to get since Oracle took over.

This is not an issue in reality where devs just use whatever chocolately, brew or apt-get pull for them to develop and use whatever is the latest docker image for prod usage.

Re: Which version of JDK should I use?

#19
post #4

Yeah I agree we should be using 17 except Gradle still does not support it, despite having been out for an entire month... https://docs.gradle.org/current/userguide/compatibility.html

If I understand that page correctly, you can use Java 17 to compile and run your program, as long as you also have Java 16 or older installed to run Gradle itself.
Post reply on HN