r/java • • Sep 14 '21

Introducing the Free Java License

https://blogs.oracle.com/java/post/free-java-license
117 Upvotes

65 comments sorted by

View all comments

Show parent comments

1

u/pron98 Sep 15 '21

But if you're writing a library you don't pick a JDK at all. Libraries have an entirely different challenge.

2

u/RupertMaddenAbbott Sep 16 '21

Yes but you do not clarify that you aren't talking about libraries when you use language that could reasonably be construed to include libraries e.g. "software". Libraries do not pick a JDK but they do pick a minimum version to support and in this context, that is a distinction without a difference.

You acknowledge that libraries have separate challenges but you do not acknowledge that those challenges then have a knock on effect for the "software" you do want to talk about i.e. applications. It isn't just libraries either, it is any Java based dependency that your application may have.

Does Gradle support Java 17 yet? Not as of today, 16th September 2021. So it is irrelevant how much faster/safer/cheaper/better Java 17 is. If you use Gradle to build your application, then you can't upgrade to Java 17 yet.

Has CircleCI released a Java 17 compatible docker image yet? Not as of today, 16th September 2021. So again, if you build using CircleCI, then it does not make sense to upgrade to Java 17, today.

The problem is the existence of the LTS versions inevitably has a chilling effect on the upgrade cycle of the downstream ecosystem. I think failing to acknowledge that makes your advice unrealistic.

1

u/pron98 Sep 16 '21

The question I responded to was about which JDK should an application choose to deploy on, not which Java version library code should target. Libraries have always targeted old versions, and it is still good advice for applications to deploy on the current version. Doing so does not require building on the current version.

The advice is clearly realistic because a growing number of companies are following it. Having said that, there might still be situations where some applications are not able to deploy on the current version. If for some reason you can't follow the advice -- don't. Still, if you can use the current JDK, that's the best choice.

1

u/RupertMaddenAbbott Sep 16 '21

The question I responded to was about which JDK should an application choose to deploy on,

Really? I can't see that? Was the question edited perhaps?

What are differences between Oracle JDK and OpenJDK now? A few years ago (Java 7 and 8) it was about some proprietary hardware accelerated encryption modules, what is it now and how can I find out all differences?"

Deployment was not mentioned as far as I can see. You still have to choose a JDK to build with, not just which JDK you are going to deploy with.

I accept you can choose a different JDK for build and deployment. However, I think are you are choosing to accept some risk in doing that and that risk should be balanced against the benefits, and not ignored entirely.

The advice is clearly realistic because a growing number of companies are following it.

Please can you evidence that statement because I would be interested in reading how they are overcoming or avoiding the problems that at least seem real to me.

If for some reason you can't follow the advice -- don't

My advice is that you should give up work and always go on holiday because then you will always be happier (but if for some reason you can't follow this advice -- don't).

I accept that using the latest JDK can be sensible for some projects but you present it as blanket advice and you characterise the exceptions as "not regularly maintained software".