Comment by lmm

10 hours ago

> Even if you do all developing on the latest LTS, you will want to be able to switch to whatever version is running on the dev or prod application servers to replicate a bug as closely as possible.

Occasionally, sure. But is it really frequent enough to worry about?

> By the way, you are ignoring the case I mentioned where a JDK bug happened between one minor version and the next.

I am, because I don't see why it's a case you'd worry about. Just install the version without the bug.

I mean sure, I can see some minor advantages to making it easy to change JDK versions. But for how often you want to do that, it really doesn't seem worth the overhead of having another moving part in your setup.

Just install the version without the bug? Have you never developed software in a company?

Sometimes the JDK version you are targetting cannot be changed at that time, for a variety of reasons, most beyond your control.

Sometimes the JDK contains or triggers a bug you need to workaround and test in various minor versions.

Sometimes you need to switch to the exact minor version used in production.

Often you need to switch JDKs even within a single project, more often with several projects.

In the years that I've used SDKMan the number of times I invoked it to switch JDK versions in a terminal was more than once on hundreds of days (along with hundreds of days where whatever I set it to was fine for weeks on end). All painless, quick, and easy. Why wouldn't anyone involved in developing Java in a corporate setting make life easier on themselves? Those are not 'minor advantages', those are major time and mental overhead savers. It's a trivial tool to install and maintain too with almost no overhead for me to worry about. And if it breaks? Then the last version I configured will just keep working, and I can spend maybe half an hour to set up an alternative. That hasn't happened yet, so for a tool I've been using for a decade or so, that's pretty good.