Live data from Hacker News

Which version of JDK should I use?

whichjdk.com

51–60 of 258 posts

Re: Which version of JDK should I use?

#51
post #43

Earlier quoted context omitted.

> (language features, performance gains) There haven't been any notable language features added since java 9 besides some basic syntax sugar (which is already covered by stuff like lombok anyway). For features and performance you might as well just target .NET 6. It has things that have been perpetually 'too hard to implement' (read: oracle doesn't want to pay their engineers to impl it and will sue you if you do it…

any references/benchmarks for some realworld apps/services? and also what do you mean by oracle suing if you implement value types?

> any references/benchmarks for some realworld apps/services?

.NET 6 is vastly more performant than .NET 5, which was already faster than openjdk and openj9 (https://devblogs.microsoft.com/dotnet/performance-improvemen...)

> and also what do you mean by oracle suing if you implement value types?

this one shouldn't need an explanation, oracle very commonly pursues frivolous lawsuits as a way of bullying money out of businesses that don't have the budget to fight them for years in various courts.

Re: Which version of JDK should I use?

#52
post #23

Earlier quoted context omitted.

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…

> (language features, performance gains) There haven't been any notable language features added since java 9 besides some basic syntax sugar (which is already covered by stuff like lombok anyway). For features and performance you might as well just target .NET 6. It has things that have been perpetually 'too hard to implement' (read: oracle doesn't want to pay their engineers to impl it and will sue you if you do it…

I’m confused why you’re suddenly talking about .NET.

Re: Which version of JDK should I use?

#53

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

Agreed, with the caveat that what has been messed up is the clarity rather than the stability. AFAIK, there are plenty of options for freely-available, unencumbered, high-quality, reliable runtimes, and have been since Oracle got involved. It's just that it's been a headache to work out that this is true, and what you should use.

I think the situation is much better now than it was. The daft renaming of AdoptOpenJDK is the only recent low point.

Re: Which version of JDK should I use?

#54
post #44

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.

The safest, cheapest choice for applications that are heavily maintained is to use the most recent version. LTS is designed for legacy applications that are no longer heavily developed, and might benefit from security and bug fixes only (note that this model is new; in the past, back when there were major versions, minor updates included both patches and big features).

It also depends on your target environment, and how much control you can exert over the machine where your software will run.

Sometimes you're creating an app that other users need to run in their own environments - and in that case, targeting "latest LTS" is safer, as they may have requirements on what they can run that you don't.

Re: Which version of JDK should I use?

#55

Earlier quoted context omitted.

> (language features, performance gains) There haven't been any notable language features added since java 9 besides some basic syntax sugar (which is already covered by stuff like lombok anyway). For features and performance you might as well just target .NET 6. It has things that have been perpetually 'too hard to implement' (read: oracle doesn't want to pay their engineers to impl it and will sue you if you do it…

I’m confused why you’re suddenly talking about .NET.

There's no real reason to use java for new development in 2021.

Re: Which version of JDK should I use?

#56

I wonder why this site doesn't enforce HTTPS, which it clearly supports. https://whichjdk.com/

What reason is there to force https on a stateless static page? The content is always the same. You're just ruining caching and wasting CPU cycles.

It protects visitors on compromised networks--and that includes things like ad injectors at coffee shops that might push nasty code to them, not just people dealing with oppressive regimes and so on. It also provides some benefit around "well, that page is HTTPS, so it's more interesting"--if every page is HTTPS, the signaling value of switching to HTTPS is destroyed, and that is a good thing.

HTTPS everywhere is a positive, and it is a good thing to do.

Re: Which version of JDK should I use?

#57
Thanks for crafting this document, it’s a great start and good to get the discussions started. For me, when I look at which distribution to use I would probably consider other factors that this post doesn’t touch upon completely. What sort of upstream contributions and activity, support across both cloud and on premise and multi architecture support are just a few that come to mind.

Re: Which version of JDK should I use?

#58
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…

Some people who want to run your software may have a policy of only running LTS versions.

In some cases, this may be your ops team.

Re: Which version of JDK should I use?

#59
Here's my recommendation (I work on OpenJDK at Oracle):

If you're using the current JDK version (recommended for regularly maintained applications), it doesn't matter which distribution you choose, as they're all pretty much identical. If you're using an old version (LTS, intended for legacy applications, which might benefit from it), pick a vendor you trust for OpenJDK support, as the builds are not the same, and neither is the support. After Oracle, which contributes about 90% of the work on OpenJDK, the companies distributing builds that contribute to the project and have experience with it are (in rough order of experience and/or contribution): Red Hat, SAP, Azul, Bellsoft, and, more recently, Amazon, and Microsoft.

There are, however, a couple of standouts: Alibaba's Dragonwell, which, last I looked, did not meet the Java specification, and Eclipse Adoptium, built by IBM, which is the only distribution built by a team that isn't involved with the OpenJDK project, isn't very familiar with it, and isn't a member of the OpenJDK Vulnerability team, and so get security patches only after the other vendors have delivered their builds.

Re: Which version of JDK should I use?

#60
post #56

Earlier quoted context omitted.

What reason is there to force https on a stateless static page? The content is always the same. You're just ruining caching and wasting CPU cycles.

It protects visitors on compromised networks--and that includes things like ad injectors at coffee shops that might push nasty code to them, not just people dealing with oppressive regimes and so on. It also provides some benefit around "well, that page is HTTPS, so it's more interesting"--if every page is HTTPS, the signaling value of switching to HTTPS is destroyed, and that is a good thing. HTTPS everywhere is a p…

Ad injectors on public wifi is a marginal 'risk' considering this page is targeted to professionals and informed hobbyists anyway, who will predominantly just be browsing from home, work or with a VPN that tunnels traffic through either a server they control or a service provider's server whom they trust anyway.
Post reply on HN