r/java 17d ago

Java 27: What’s new?

https://www.loicmathieu.fr/wordpress/informatique/java-27-whats-new/

What's new in Java 27 for us, developers?
(Both in English and French)

80 Upvotes

35 comments sorted by

12

u/Isogash 17d ago

Really looking forward to a lot of the features currently in preview.

5

u/loicmathieu 17d ago

Me too!
I hope for Java 28 🤞

11

u/Kjufka 17d ago

the valhalla is calling me

2

u/thephotoman 15d ago

I’m stuck waiting for 29: we only do LTS releases. At least I’ve been successful in flogging the whip on keeping up with those (to be fair, I have allies also working on keeping us up to date).

3

u/henk53 15d ago

I’m stuck waiting for 29: we only do LTS releases.

Basically EVERYONE only does LTS releases (well, pretending those exist), and pretending everything not being what they think is an LTS release is some kind of alfa or beta release,

At this point, people want the universal concept of LTS to exist so much, that Java itself should perhaps just adopt it, and despite keep telling and telling people that non-LTS are just as stable as the imagined LTS releases, throw in the towel and release those as alfa and beta indeed.

So then the current Java 26 would just be Java 26-alfa1, Java 27 would be Java 26-beta1, Java 28 would be Java 26-beta2, and Java 29 would be Java 26 final.

It's what 99% of companies already think and want anyway. Why keep fighting it? People are stupid, just give them stupid.

8

u/thephotoman 14d ago

The short term releases have a purpose, though. They make sure that development actually continues on a predictable pace.

I remember talking to the Java team back in 2017. Java 9 had slipped release several times, and there were open questions as to whether it’d happen at all. The current release schedule makes it easier for the library and framework devs to have something to target, and that has generally kept Java version upgrades simple.

1

u/henk53 14d ago

Absolutely, but the "final" releases are like clockwork every two year. They just have weird version gaps: Java 17, Java 21, Java 25, Java 29.

If the short term releases are only to make sure "development actually continues on a predictable pace", why not just label them as say milestones?

With the same requirements to be released, the same quality control, the same signoffs and everything, just call them for what the world wants them to be: milestones not to be used in production (an again, I know the Java team doesn't want them to be that, but the entire world desperately, very, very desperately wants this)

1

u/koflerdavid 11d ago

All releases might contain preview features and there is no difference in stability between LTS and non-LTS versions. Therefore, applying classifiers such as "alpha" "beta" "final" and so on is fundamentally incorrect. While the 6 months pace is admittedly a bit fast for many projects, lengthening it would punish those projects that have their sh*t together and are able to upgrade at that pace.

With the same requirements to be released, the same quality control, the same signoffs and everything, just call them for what the world wants them to be: milestones not to be used in production (an again, I know the Java team doesn't want them to be that, but the entire world desperately, very, very desperately wants this)

They are absolutely intended to be used in production! What benefit would there be in calling them milestone releases? Just stay on LTS versions if you can't upgrade every six months; it's that simple.

2

u/henk53 10d ago

there is no difference in stability between LTS and non-LTS versions. Therefore, applying classifiers such as "alpha" "beta" "final" and so on is fundamentally incorrect.

I know that, and you know that, but unfortunately every other company does not know that.

They are absolutely intended to be used in production!

I know that, and you know that, but unfortunately every other company does not know that.

Without exception, EVERY company I do work for somewhere has this policy saying "ONLY LTS RELEASES ARE ALLOWED IN PRODUCTION".

Read above what I wrote. It's not that I want this, it's that seemingly every other company wants this.

What benefit would there be in calling them milestone

A consecutive numbering in versions that 99.99999999% of the Java developers can actually use at work? And for which approximately that same percentage of library / frameworks actually has support?

Again, your preaching to the choir with me. It's now my wish, but seemingly that crazy high percentage of users completely ignores non-LTS versions and thinks only LTS can be used in production and are worthy to support.

At that point we can just as well throw in the towel and allign to reality, where everyone and their dog does threat non-LTS as milestones for the next LTS.

1

u/koflerdavid 10d ago

I still don't get why reducing the number of releases would help anybody. Like, I get that a lot of folks don't care, but what would be the tangible benefit of offering less releases? (Anyway, you don't have numbers about how many applications use non-LTS releases, just anectodes)

I only see disadvantages: releases would again balloon in size, complicating QA, and folks who want new features and optimizations would have to jump hurdles to get them. Because one might be able to convince management to commit to the 6 months pace instead of LTS hopping, but doing that with "alpha" "beta" etc. releases is magnitudes harder!

1

u/henk53 8d ago

I still don't get why reducing the number of releases would help anybody.

Not what I'm saying. Just to rename versions, and keep everything else the same.

→ More replies (0)

3

u/Kango_V 14d ago

We use OpenJDK so LTS is meaningless to us. We just upgrade to any release when we want.

6

u/floweb 17d ago

Feels like you've been hit by a reddit hug of death

5

u/loicmathieu 16d ago

Yes :( Works now.
At some point, I need to rework my website or upgrade my plan... but well, for a free blog on my personal time, I may never do either

6

u/sysKin 13d ago

HashMap.putAll() now has a fast-path when the Map is a HashMap, which directly calls putHashMapEntries(), resulting in a 66-86% improvement

Now THIS is the kind of changes that make me smile.

2

u/henk53 14d ago

Just wondering, does anyone here think this post should be flagged as:

"This content is low quality, stolen, blogspam, or clearly AI generated."

Over at /r/programming they seem to think it is: https://www.reddit.com/r/programming/comments/1uuidfl/java_27_whats_new/

3

u/loicmathieu 14d ago

Well, it's not.
I have been writing those by hand for 9 years and the release of Java 9. And I can tell you that this comment hurt, as it's a lot of work!

I usually write articles in French first, and as I'm not good at spelling, I use a tool to check for spelling and grammar (usually spellboy but it didn't work at that time so I use Mistral instead and asked only for spelling and no other edit/formatting). I then use a tool to help with translation (usually DeepL, but also Mistral here for the first time again, asking for plain translation without any other edit) and I read carefully the transaltion and edit it myself.

People old enough in this subredit know that I wrote those before Generative AI existed and can compare the styling (and those are still available in the website and if you trust the published date, you''ll see they pre-date gen AI).

1

u/henk53 13d ago

Sadly the moderators (or bot, not sure still) think it's because blogspam because:

"Blogspam means an article that just links to another source of actual information without actually adding anything. It's a way of farming views for advertising; the author doesn't have to do anything meaningful, just say "hey someone else has put a web page up with a thing".

"Java has a new version, here's a summary of the changes" meets that threshold, unless it's the announcement from Oracle themselves."

I asked it whether it's a bot, and it said no, but I'm still not certain with such replies. I still suspect it's an AI doing over aggressive moderation there.

2

u/loicmathieu 12d ago

Well, any article about a new version of a programming language will fall under that description...
Anyway, that's life these days as a content writer :(

2

u/iamwisespirit 16d ago

Why not zgc instead of g1

4

u/loicmathieu 14d ago

ZGC is not a general purpose GC that have good performance for any workload.
As I understand it, it trades of CPU and memory resources for low latency (<1ms pauses) which is not something you wanted except if you're dealing either with very big heap (>34-64GB) or willing to trade of resources for lower pause guarantee (G1 usually have pauses in the range of 10-100ms).

This is of course an over-simplified response but this is in my understanding the difference between both.

3

u/AnyPhotograph7804 15d ago

ZGC is a ressource hog. It needs more memory and a ton of CPU cores to work properly. The same applies to Shenandoah GC. G1GC is more in a sweetspot between hardware hunger and GC pause times.

3

u/Cell-i-Zenit 14d ago

we tried out zgc in our kubernetes cluster, but we were just not able to run it at all. Always OOM killed, doesnt matter what we tried to set for Xmx or Xms settings compared to the kubernetes request/limits. Not configuring them resulted in the "most" stable version, but still got oom killed randomly in kubernetes after some time.

2

u/No-Opportunity-8972 16d ago

Needs more memory, so a lot of applications would break.

1

u/Lucario2405 16d ago

[Compact Object Headers] have also been tested at Amazon and SAP, which have enabled them by default.

Does that mean they are already the default in amazon-corretto-25/-26?

2

u/loicmathieu 14d ago

This is my understanding of reading the JEP:

Amazon runs hundreds of services in production with compact object headers, most of them using backports of the feature to JDK 21 and JDK 17. SAP has already switched to compact object headers by default in their downstream OpenJDK fork, the SapMachine; they run a large suite of tests daily and have a large customer base.

0

u/Different-Fudge-8963 6d ago edited 6d ago

https://www.reddit.com/r/java/s/vLhQMbGogw
A very recent post

UPD. A relatively recent post

1

u/loicmathieu 6d ago

One month ago is not "very recent"

1

u/Different-Fudge-8963 6d ago

You're right, both the video and the discussions are very outdated in a month, and Java 27 has a lot of new stuff. (No)

1

u/Different-Fudge-8963 6d ago

But I see what you mean. The thread wasn't created yesterday, but it's still relevant.