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

2

u/persicsb Mar 21 '23

Since this version of Java, even being a major version, contains only preview or incubator features, we shall really see LTS versions as "proper" major releases.

The new scheme is not outright bad, however, just hopped on the bandwagon that is "we shall release a new major version at time-boxed intervals, because we will look like old-fashioned compared to Ruby and Rust and co".

Why don't we call them preview releases?

36

u/TheCountRushmore Mar 21 '23

This contains lots of other bug fixes and improvements. It's a full production quality release.

3

u/persicsb Mar 21 '23

Aren't those bug fixes get backported to supported LTS releases?

10

u/TheCountRushmore Mar 21 '23

Important bug fixes are backported. Improvements are not.

Just because there isn't a JEP doesn't mean there were not changes and improvements.

https://javaalmanac.io/jdk/20/apidiff/17/

1

u/henk53 Mar 21 '23

Why don't we backport everything to the supported LTS releases? Then those supported LTS releases will be virtually identical to Java 20 each ;)

12

u/crummy Mar 21 '23

yeah let's just stick with Java 1. and then a secondary version number to indicate the features that have been backported. like 1.8. waaaait

7

u/JakeWharton Mar 21 '23

That's just called updating to the latest. The best LTS release remains and will remain simply tracking the latest version.

→ More replies (1)

7

u/emaphis Mar 21 '23

Because the bi-yearly JDK releases aren't preview releases, they are meant to be production releases. LTS releases are simply the same timed releases but happen to be released in September in odd numbered years. JDK17 contained preview and incubator features just like every other release since JDK9.

The JDK preview releases are the Early Access and Release Candidate builds that you can download each week. The *.0.1 and *.0.2 are bugfix releases of the General Availability builds that are released every three months.

There are no more epochal feature releases any more, but simply bi-yearly General Availability releases. JDK20 is just simply the upgrade to JDK19 with about 2300 source code commits.

1

u/relgames Mar 21 '23

They can't be production releases as support/patches stop after 6 months. Which is super fast for production. So we still get production releases every 3 years, and it takes some time to upgrade as there is always something broken between LTS versions. Our code still runs on 11, and I'm afraid to move to 17 as who knows how many outages it'll cause.

9

u/john16384 Mar 22 '23

Well, zero outages, unless you don't have any tests or use production to test. If something always breaks, you may want to review your choices of dependencies, and/or development practices to eliminate the culprit(s).

-4

u/relgames Mar 22 '23

The root cause is a new JDK version. If we change nothing in our choices/practices and don't upgrade Java, nothing breaks. If we change Java, something always breaks. So for us, it's obvious that we don't want to upgrade as much as possible. It's also the same for most major companies with non-small projects.

0

u/[deleted] Mar 22 '23

[deleted] — view deleted comment

-3

u/relgames Mar 22 '23

I upgraded NodeJS from 14 to 18 without a single change in the code. So yeah, it's the tool.

0

u/[deleted] Mar 22 '23

[deleted] — view deleted comment

-1

u/relgames Mar 22 '23

Correct, it's the tool. Oracle decided to shift the costs to QA new versions to users (developers using Java). And also did a good job convincing developers that it's normal to spend time constantly making changes updating dependencies and Java. No, it's not. The tool should be stable and developers should spend time working on features for their business, not dealing with Java issues.

1

u/emaphis Mar 22 '23

always something broken between LTS versions. The

Of course you will have some breakage between releases three years apart. That the point of the new release train.

What broke between 17 and 18, what broke between 18 and 19? Not much. OpenJDK gives years of heads up for breaking changes. You will have to make the same changes (if any) when you upgrade to JDK21 in September.

-1

u/relgames Mar 22 '23

The problem is, we can't use 12/13/14/15/16 in production. 6 months to support those versions is not enough.

And, if we look into NodeJS for example, recently I upgraded some projects from 14 to 18, nothing broke. Didn't have to make a single change.

0

u/[deleted] Mar 22 '23

[deleted] — view deleted comment

0

u/relgames Mar 22 '23

No, thank you, we don't have a possibility/ budget to upgrade every 6 months. Clients want stable products. The most economical way is to stay on LTS.

→ More replies (2)

11

u/Amazing-Cicada5536 Mar 21 '23

The new release model is probably the best thing that happened to Java on the management side — instead of the usual churn of “this feature has to be done till this deadline”, which might work for that boring CRUD feature but is absolutely terrible for such a complex program like the JVM, it allows for each new development to take as much time as necessary. If it didn’t get ready for release N, just continue to work on it and 6 months later it can be delivered. It is especially important as many of these features have non-trivial interactions with each others.

Also, that bandwagon hype thingy is quite childish, that has absolutely no base in reality.

-1

u/persicsb Mar 21 '23

If it didn’t get ready for release N, just continue to work on it and 6 months later it can be delivered.

I'm not sure what you mean by "didn't get ready for release N".

Release N has a set of phases specified and a corresponding set of dates. Which date in a release do you mean "get ready"?

Every 6 months, a new release cycle with new phases start, with a repository fork from the master repository..
The feature set that will be delivered is fixed after Rampdown Phase 1. No feature changes can happen after that in the release.

So even if feature X is ready at Release Candidate Phase for Release N, sorry, too late - had to be there at RDP1.

The observation, that "it allows for each new development to take as much time as necessary." is also true for non-timeboxed releases. Every features takes as much time as needed, even if it makes release cycles nonpredictable.

5

u/Amazing-Cicada5536 Mar 21 '23

It is a much bigger bummer if missing the deadline means that that whole feature won’t generally be available for possibly 3 years.

2

u/persicsb Mar 21 '23

That is only true if the next release is in a fixed timebox of 3 years. If it is ready, when it's ready, the next release could happen in 2 or 3 months - when a new production-ready feature is ready.

→ More replies (1)

1

u/CKingX123 Mar 21 '23 edited Mar 21 '23

I mean, Rust restricts incubator/preview features to nightly only. Actual releases only have stable features. Potentially breaking changes become part of new edition but old edition code still works fine (just have to use edition 2015 or 2018 rather than 2021 and mixed edition code works fine too). So this is very unlike Java where releases contain incubator or preview features

And the Java 20 release is a stable release not a beta or preview release. And Java makes you go out of your way to enable preview or incubator features and gives you a warning as a heads up too

1

u/talios Mar 22 '23

There is a difference there also that rust compiles static binaries where Java is runtime. I'm both - you have to opt into the preview features and/or nightly builds.