Live data from Hacker News

Which version of JDK should I use?

whichjdk.com

21–30 of 258 posts

Re: Which version of JDK should I use?

#21
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?

Sometimes there is just not enough resources (time, developers, expertise) to update the project. Those projects are often internal and never see the outside of a companies network.

Re: Which version of JDK should I use?

#23

The general guidance is always use the last LTS release unless there is a specific feature in the non LTS releases that you can’t wait for. So any new development should target 17 at this point. Unless you want serious long term pain then you shouldn’t be more than one LTS release behind. So if you are not running on JDK 11 or later you should be strongly thinking about upgrading.

Why should I stick to LTS? All other versions aren't in any way less tested, you should always stick to the newest released JDK version, be it LTS or not, this way you get all the benefits (language features, performance gains) and security ones (security fixes always first land in the newest version, and are backported to the older ones).

Upgrades now are pretty straightforward if you are past JKD 9 - with JDK 16-17 being a bit tricky, but less than JDK 9.

Re: Which version of JDK should I use?

#24
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?

No, too unreliable.

Re: Which version of JDK should I use?

#25
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.

I guess it serves right to folks who endlessly hated Maven and liked this "new", "next generation" , "modern" build system with no XML. Turns out as long as JDK-8 is supported version of Java a lot of tools like this look modern.

Re: Which version of JDK should I use?

#26
post #23

The general guidance is always use the last LTS release unless there is a specific feature in the non LTS releases that you can’t wait for. So any new development should target 17 at this point. Unless you want serious long term pain then you shouldn’t be more than one LTS release behind. So if you are not running on JDK 11 or later you should be strongly thinking about upgrading.

Why should I stick to LTS? All other versions aren't in any way less tested, you should always stick to the newest released JDK version, be it LTS or not, this way you get all the benefits (language features, performance gains) and security ones (security fixes always first land in the newest version, and are backported to the older ones). Upgrades now are pretty straightforward if you are past JKD 9 - with JDK 16-17…

》All other versions aren't in any way less tested

Source?

Re: Which version of JDK should I use?

#28

The general guidance is always use the last LTS release unless there is a specific feature in the non LTS releases that you can’t wait for. So any new development should target 17 at this point. Unless you want serious long term pain then you shouldn’t be more than one LTS release behind. So if you are not running on JDK 11 or later you should be strongly thinking about upgrading.

There is more to this now tho, because even their topline recommendation misses the fact that Temurin (anagram of runtime) only provides a small subset of tested builds you need.

They are in there but easy to miss - Bellsoft actually have builds for both jdks and jres for more than mainstream x86_64. Termurin dont even have jres anymore (last time I checked)

https://bell-sw.com/pages/downloads/#/java-17-current

Re: Which version of JDK should I use?

#29
post #23

The general guidance is always use the last LTS release unless there is a specific feature in the non LTS releases that you can’t wait for. So any new development should target 17 at this point. Unless you want serious long term pain then you shouldn’t be more than one LTS release behind. So if you are not running on JDK 11 or later you should be strongly thinking about upgrading.

Why should I stick to LTS? All other versions aren't in any way less tested, you should always stick to the newest released JDK version, be it LTS or not, this way you get all the benefits (language features, performance gains) and security ones (security fixes always first land in the newest version, and are backported to the older ones). Upgrades now are pretty straightforward if you are past JKD 9 - with JDK 16-17…

The JDK itself may receive a similar amount of testing upstream, but libraries downstream tend to receive more testing on LTS JDKs.

Re: Which version of JDK should I use?

#30
post #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 al…

It should also work with the latest versions of Gradle (7.2 or so), as the Groovy runtime used by Gradle has since been upgraded.

https://github.com/gradle/gradle/issues/16857

Post reply on HN