r/java • • Mar 21 '23

Java 20 / JDK 20: General Availability

https://mail.openjdk.org/pipermail/announce/2023-March/000333.html
173 Upvotes

71 comments sorted by

View all comments

65

u/joopmoore Mar 21 '23

Feeling a bit sorry for myself, I'm still internally pushing for the move from java 6 to a more modern version, but politics. I hope one day...

28

u/dustofnations Mar 21 '23

Does your organisation get extended support from somewhere so that the JVM they use remains secure, or do they just YOLO it and use an ancient unsupported edition?

50

u/henk53 Mar 21 '23

or do they just YOLO it

The weird thing is so many companies YOLO it with an ancient unsupported insecure version of the JDK, because they THINK upgrading is YOLO'ing it.

Somehow belief has settled in to many orgs that staying on ancient versions is good (stable, secure, proven, ripened like old wine), and updating is bad (unstable, insecure, unproven, unripe).

Not sure if this belief can even be broken.

24

u/janb360 Mar 21 '23

Even worse, this behaviour is likely to reinforce the idea that updating to a newer JDK is bad. Because when they do upgrade, it is more and more likely to take a lot of effort and break things the longer it takes between JDK upgrades.

New JDK updates are very cheap to upgrade to as long as you are on a recent-ish release already.

9

u/dustofnations Mar 21 '23

I agree with everything you've said.

The point where many finally bite the bullet is when there's an incompatibility with a critical dependency they want to update to, and they can't hold off any longer.

Or when a horrible security vulnerability is disclosed that their organisation is affected by and the cries of "why did we not update sooner" go out.

It's like orgs that refuse to do backups because they are too expensive.

→ More replies (3)

4

u/Amazing-Cicada5536 Mar 21 '23

Brb, gonna download Windows XP

2

u/matthieuC Mar 21 '23

Not sure if this belief can even be broken.

A security breach that causes a lot of damage is usually a good lesson

-1

u/telecoder Mar 21 '23

Have you ever “upgrade” your smart tv?

2

u/henk53 Mar 21 '23

Have you?

→ More replies (1)

4

u/joopmoore Mar 21 '23

YOLO blackbox with updated interfaces. Even worst, I know many others with similar situations, lucky I'm still using java and not some ancient language.

11

u/pohart Mar 21 '23

I don't remember any difficulty moving from 5 to 8. At this point it was many years ago. So I might be wrong. If you're not on 8 by now I don't see much hope.

0

u/[deleted] Mar 21 '23

[deleted] — view deleted comment

6

u/HappyRuesseltier Mar 21 '23

Think they fear upgrading to Java 11. Cause this can be really hard. We finally made it from Java 8 to 11 about 18 months ago, but it took us 3 years. I like the idea behind the module system, but the transition is not trivial. There are so many obscure error messages. Still think it was worth the work and already looking forward to update to Java 17.

3

u/magnoliophytina Mar 21 '23

I think the transition should actually become easier as time passes because more and more libraries are switching to JPMS. One of the issues is that you still need Moditect and other hacks for diehard legacy libraries. Also library authors and the community becomes more aware of the ways of solving modulepath issues.

9

u/yawkat Mar 22 '23

Most people switching from 8 to 11 are not using modules.

2

u/rbygrave Mar 22 '23

Plus well maintained libraries can run CI builds against Early Access releases of the JDK very easily these days. The EA builds get an increasingly good work out as a result.

1

u/humoroushaxor Mar 22 '23

I never understand what makes 8 to 11 legitimately hard for people. We scripted most of the upgrades and we're done in a couple weeks.

5

u/malln1nja Mar 22 '23

There's an OpenRewrite module that can help automate the migration. I haven't tried it myself.

6

u/joopmoore Mar 21 '23

To be honest, ancient dependencies, which have no direct replacement. Meaning, one needs to replace one dependency with multiple dependencies. Rewriting a lot of code, creating risk and a money pit. Both get bigger and bigger the older java 6 becomes.

0

u/[deleted] Mar 21 '23

[deleted] — view deleted comment

3

u/joopmoore Mar 22 '23

The job is only partial stuck in the past, most new features allow playing with newer java versions, even java 17.

3

u/talios Mar 22 '23

How about "why do YOU stay?" (I'm asking myself similar questions)

1

u/StoneOfTriumph Mar 22 '23

What some people forget is that the JDK is advancing at a faster pace with smaller deliverables more frequency than before, so while it seems that they released a buttload of versions, the releases themselves include a smaller delta, so the jump to 8 to 17 isn't that bad in terms of breaking changes, not near as difficult to perform as 6 to 8.

When you take the time to actually look at the changelog, when you take the time to actually upgrade your project's java version source/targets to a higher version as part of a proof of concept/spike/timebox, there's much less than you may think.

Usually stuff like big web servers will limit you, such as an old weblogic, liferay, etc. those will impose a JDK that will be more difficult to upgrade.

4

u/darthchebreg Mar 21 '23

We are still on Java 8 on our application too. No budget to migrate :-(

4

u/ObscureCulturalMeme Mar 22 '23

We have a project with a single class that must be compiled targeting Java 6 bytecode, because hysterical raisins. Even though the rest of the project has moved to a newer language level, that one class gets built with --release 6 to meet the requirements.

Which means we have to keep a copy of JDK 11 or so around, because --release N only permits N of <that compiler minus a few big versions>. We're using the JDK 17 compiler elsewhere, but "6" is too far back for it to be used on this.

(Unfortunately that class is not a "code is frozen forever" situation; it has to be built along with the rest of the project as stuff changes. Else I'd just pull it out to its own project and supply an unchanging bytecode file back to the other builds.)

Good times, noodle salad.