Live data from Hacker News

Which version of JDK should I use?

whichjdk.com

141–150 of 258 posts

Re: Which version of JDK should I use?

#141
post #43

Earlier quoted context omitted.

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…

I don't see any mention of Java in the article you linked, do you have any source on .NET being faster?

Re: Which version of JDK should I use?

#143

I’ve tried more than once to learn Java I find it very confusing. This website resolves one of the issues. The other issue I have is that most Java tutorials use IntelliJ, or some other IDE, which makes it difficult to figure out what a non IDE workflow actually looks like, some managing dependencies is confusing. I wonder if c# and mono is better in this respect

The strongest plus I could say for Java is that it's a stable workhorse that pays the bills, and that the tooling is pretty good. Non IDE workflows don't exist practically, as a curiosity it's nice to compile something "by hand", but the knowledge is nonessential. Switching from one IDE to another is not that big of a deal, workflow-wise, you shouldn't worry about it.

As a side note, I appreciate that we have multiple tooling for Java. It doesn't sit well with me when the whole language, and its IDE and compiler and everything is bundled up in one package and that's all you have.

Re: Which version of JDK should I use?

#144

Is there a way to apt-get the new JDK 17 as a package on Ubuntu, instead of piping a shell script from curl or unzipping a tar? Does anybody use package managers on Linux anymore?

Last time I checked, at least in Ubuntu 20.04, there was already a package for OpenJDK 17, so I think that's the straightforward and recommended way to get Java 17 in Ubuntu.

Re: Which version of JDK should I use?

#145

Is there a way to apt-get the new JDK 17 as a package on Ubuntu, instead of piping a shell script from curl or unzipping a tar? Does anybody use package managers on Linux anymore?

Getting Java through apt-get gives you more or less the worst quality builds https://mail.openjdk.java.net/pipermail/jdk8u-dev/2019-May/0... You get mystery bits that haven't been put through the TCK.

I think a custom package repository could be a proper solution then. This way one would get version upgrades for free. Much better than installing (curl-piping) yet another package management tool `sdkman` with a new syntax.

Though, I might be missing some important details, and I would love to understand it better.

Edit: a sibling comment suggested that now there's a package repository for that, and indeed there is.

Re: Which version of JDK should I use?

#146
post #5

I'd like to see more of a rationale for not using Corretto on non-AWS servers. What's wrong with it?

The author doesn't justify it but I suspect the thinking is related to how fixes are prioritized.

If there is a bug/performance issue that only happens in the context of AWS, then Corretto would be the most likely to rapidly patch the issue as it impacts their customer base. Potentially patches for those sorts of issues would be discovered by AWS through their own use and testing.

Likewise for the other vendors and their own platforms.

Re: Which version of JDK should I use?

#147

Is there a way to apt-get the new JDK 17 as a package on Ubuntu, instead of piping a shell script from curl or unzipping a tar? Does anybody use package managers on Linux anymore?

Last time I checked, at least in Ubuntu 20.04, there was already a package for OpenJDK 17, so I think that's the straightforward and recommended way to get Java 17 in Ubuntu.

Wow, you're actually right — I wasn't able to find it before (maybe Java 17 was too new back then).

If anybody's interested:

    sudo add-apt-repository ppa:linuxuprising/java
    sudo apt-get update
    sudo apt-get install oracle-java17-installer oracle-java17-set-default

Re: Which version of JDK should I use?

#148
post #122
post #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 ne…

> Eclipse Adoptium, built by IBM, which is the only distribution built by a team that isn't involved with the OpenJDK project Wasn't AdoptOpenJDK the "legit" recommendation a couple years ago? I only heard about all of these other versions sometime later. (Looking again, it looks like the Oracle OpenJDK is shipped in Ubuntu's repos, so maybe I was mistaken).

It was, it recently transferred to Eclipse

Re: Which version of JDK should I use?

#149
post #109

Earlier quoted context omitted.

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…

I got stuck in this conundrum at my previous gig as well, and think reached a very different conclusion than you. In short, while I’m skeptical of some of the degree of churn across modern software development as a whole, I’m not sure that this is actually an issue with the Java ecosystem, which has been, and I think continues to be, way more sensitive to backwards compatibility than almost any other ecosystem. In so…

In general you are right that the Java ecosystem is highly backwards compatible, but 9 is a bit of an exception. The module system breaks a lot more stuff than usual, and is the reason a lot of legacy is stuck on 8.

Re: Which version of JDK should I use?

#150

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…

Just do the 8-11 upgrade first. The XML part has a lot of life left in it, still lots of advantages over attributes.
Post reply on HN