Live data from Hacker News

Which version of JDK should I use?

whichjdk.com

231–240 of 258 posts

Re: Which version of JDK should I use?

#231
post #63

Earlier quoted context omitted.

Here is one real reason to prefer it over .NET Core: https://github.com/dotnet/sdk/issues/6145

why actually? what does it send?

In the past it has sent command line arguments and the path of the current working directory, among other things, according to comments on that issue. Even if Microsoft doesn't intend to deliberately collect sensitive data, they don't seem to think it's worth putting much effort into preventing accidental data leaks from broken anonymization, unreliable opt-out mechanism, etc.

Re: Which version of JDK should I use?

#232

These recommendations are pretty arbitrary and don't even attempt to scratch the surface of what is actually materially different between the JDKs. Don't use Corretto outside of Amazon... why? Don't use Dragonwell because... China bad? Use Red Hat OpenJDK if you're running on Red Hat servers, Microsoft OpenJDK if you're on Azure, SapMachine if you're on SAP, because... the name matches so that's nice? At least they'r…

> Use Red Hat OpenJDK if you're running on Red Hat servers, Microsoft OpenJDK if you're on Azure, SapMachine if you're on SAP, because... the name matches so that's nice? Presumably this has to do with support and possible testing. People buy RedHat EL for the longterm support, if they use a different vendor for the JDK they have to set up a whole new contract for that with a different company. By contrast, people us…

These statement about support i just don’t get at an objective level. Redhat will not assign a strong developer to investigate your bespoke application running on tomcat or whatever to identify the bug. Possible pragmatic reasons

You will get a l2 sysAdmin or an intermediate developer. If for some reason the root cause is nailed to a reproducible bug then it will go into the bug tracker

Re: Which version of JDK should I use?

#233

These recommendations are pretty arbitrary and don't even attempt to scratch the surface of what is actually materially different between the JDKs. Don't use Corretto outside of Amazon... why? Don't use Dragonwell because... China bad? Use Red Hat OpenJDK if you're running on Red Hat servers, Microsoft OpenJDK if you're on Azure, SapMachine if you're on SAP, because... the name matches so that's nice? At least they'r…

> the name matches so that's nice? To me it sounds reasonable that Microsoft tests/optimizes their JDK better for Azure, and Amazon -- for AWS.

Assumptions are the mother of all fuck-ups..

Re: Which version of JDK should I use?

#235

Earlier quoted context omitted.

Java is way better than .net, which nobody at all uses outside MS. Certainly not in enterprise.

>Certainly not in enterprise. pretty odd take, in which country?

yeah, you got it. My city has very little job listings requiring .NET for actual back-ends. Whereas, there are like a thousand Java jobs and almost half mentioning Spring

Re: Which version of JDK should I use?

#236

Earlier quoted context omitted.

> Use Red Hat OpenJDK if you're running on Red Hat servers, Microsoft OpenJDK if you're on Azure, SapMachine if you're on SAP, because... the name matches so that's nice? Presumably this has to do with support and possible testing. People buy RedHat EL for the longterm support, if they use a different vendor for the JDK they have to set up a whole new contract for that with a different company. By contrast, people us…

These statement about support i just don’t get at an objective level. Redhat will not assign a strong developer to investigate your bespoke application running on tomcat or whatever to identify the bug. Possible pragmatic reasons You will get a l2 sysAdmin or an intermediate developer. If for some reason the root cause is nailed to a reproducible bug then it will go into the bug tracker

A few years back I contacted SUSE support due to a confusing package change in a SUSE upgrade. The first-level support person did not know the answer, so they reached out to the relevant developer within SUSE, and got the explanation within a couple of days. Do you have any reason to expect Red Hat support to perform worse?

Re: Which version of JDK should I use?

#237

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.

Currently upgrading a ~1M SLoC Java enterprise app (with regular Spring, Jetty in there, scheduled processes, PrimeFaces for web UI, REST API services, SOAP services, the whole shebang) from Java 8 to Java 11 (since 17 wasn't out when that change was approved) and it's largely proving to be a pain. Since the version of Spring is ancient and changes over to Spring Boot were also approved, now have to rewrite parts of…

Aa somebody who has had to do a Spring upgrade in the past, from 2.x to 4.x, I suggest you do Spring first, then the JDK after. Spring still supports 8 well after it starts supporting 11. Once you reach a certain version of Spring, upgrading the JDK is as simple as changing a 1.8 into an 11.

I don't know PrimeFaces, but I have worked with JSP, which does have a flag to set the compiler version (in case you were ever thinking about putting java lambda's in JSP files, which is possible but not recommended due to mixing code).

The hardest part of upgrading the JDK is going from 8 to 9. After 9 it is much more forgivable. As for Spring, major versions are a pain, as is Hibernate. The other parts of Spring are generally well upgradable if you read the Spring changelogs.

Re: Which version of JDK should I use?

#239
post #217

Earlier quoted context omitted.

LTS = long term support Support for vulnerability patches, stability, and so on. You can automatically update and maybe that goes well and maybe problems are caught in testing. Regardless those events and changes have over time have increased costs. LTS should mean lower costs both through increased support focus, increased population of active users, and reduced forced change. You're not wrong...

But if you don't buy LTS you won't get it. And many companies are cheap and don't buy - hence using JDK 17 won't give you LTS, buying support gives you LTS.

JDK 11 is now at 11.0.12, which was released in July, and you can get it for free from multiple vendors.

Non-LTS JDK doesn't have anything after 6 months.

Post reply on HN