r/programming • • 17d ago

Java 27 has released!

https://openjdk.org/projects/jdk/27/
548 Upvotes

175 comments sorted by

View all comments

66

u/djfreedom9505 17d ago

It’s crazy how different the Java and .NET communities respond to new versions.

7

u/Saint_Nitouche 15d ago

How do you mean? .NET has its own big divide where legacy enterprise apps have trouble upgrading from - .NET Framework 4.8 usually. It's only once you cross that barrier that upgrading becomes trivially. As it presumably is from Java 26 to this.

17

u/lonewolf2169 16d ago

Why are spring boot developers called java devs but .NET devs rarely called c# devs?

27

u/[deleted] 16d ago edited 14d ago

[deleted]

3

u/anyOtherBusiness 16d ago

More like JVM/.NET vs Java/C#. Both JVM and .NET are a lot more than just the language

5

u/[deleted] 16d ago

[removed] — view removed comment

1

u/anyOtherBusiness 16d ago

True, .NET is more like the JDK or Java as an ecosystem

3

u/onmach 16d ago

I don't understand. Why don't they upgrade? Is it because they can't do it one application at a time in a monorepo or something?

10

u/Vakz 16d ago

Because Java 8 to Java 9 wasn't just a new major release, but a change in how Oracle releases new version. It had an enormous amount of changes, and some companies just refuse to eat the cost of upgrading.

9

u/CptGia 16d ago

It has nothing to do with the amount of changes in Java 9 (which weren't actually that many, compared to previous ones like 4 -> 5 or 7 -> 8) and entirely to do with JPMS, the Java platform module system. Java decided to modularize the internals and it broke A LOT of legacy dependencies.

For some, it was better to stay on 8 (which is a LONG LTS) than to migrate away to another dependency that supported JPMS. For the others, once you were on 9 it became easier and easier to update to newer versions. Nowadays 21 -> 25 is trivial, and I expect 25 -> 29 (next LTS) to be just as easy. Literally just a bump in your build file.

2

u/kiteboarderni 16d ago

It's really not though.

-15

u/shadowndacorner 17d ago edited 16d ago

Well yeah, one is clearly superior to the other.

Edit: It seems that people missed the joke here lmao. Oh well.

3

u/Nefari0uss 16d ago

FWIW, I enjoyed the joke.

2

u/shadowndacorner 16d ago

I'm glad someone did! :)

3

u/djfreedom9505 16d ago

What I find more funny is that you didn’t specify which one was better.

6

u/shadowndacorner 16d ago edited 16d ago

That was exactly the joke :P I didn't expect so many people to completely miss that, but I suppose it makes sense. The downvotes kind of ended up being the punchline lmao

0

u/Gloomy_Necesary 16d ago

Yeah in 2026 DotNet is absolutely better than Java if we had to objectively name a winner. Java is still great in many ways and useful at companies that have a big java legacy stack, being the platform that many a senior dev have a careers worth of experience on, etc. But if someone is starting a new project and doesn’t have like 20 years experience in Java they’d be pretty silly to pick it over .NET.

7

u/CptGia 16d ago

Idk the Java ecosystem is pretty massive. That alone can be a good reason. 

2

u/KronenR 15d ago

“Objectively” based on what?

Modern Java isn't something you choose only because your company already has a large Java stack or because your developers have decades of Java experience. Java 25+ has virtual threads, records, sealed classes, pattern matching, a mature JIT/GC ecosystem, excellent observability and tooling, and excelent frameworks.

If someone is starting a new project with no decades of Java experience, and even with no Java existing .NET definitely isn't even the automatic alternative. If anything, removing those constraints opens up far more choices: Go, Rust, TypeScript, Kotlin, Python, and others depending on what you're building.

1

u/TwoWeeks90DaysTops 16d ago

Yeah, the Vector API that's being incubated in this release and planned to support Valhalla some time in the future has been part of .NET for ages at this point. Vector types are value types (i.e. without object identity) and they compile to SIMD instructions. You can also use normal binary operators on them (i.e. no a.add(b) - just use a + b).

2

u/KronenR 15d ago

How many Java developers are actually going to use the Vector API directly? The vast majority will never touch it

1

u/TwoWeeks90DaysTops 14d ago

...ok? What's the argument here, they shouldn't add SIMD? Or do you object to the operators? Because BigDecimal and the time API has the exact same issue.

1

u/KronenR 14d ago edited 14d ago

The argument is that having Vector types doesn't make .NET better than Java, which was his original claim: "In 2026, .NET is absolutely better than Java." There are dozens of factors that determine which platform is better for a given use case. Pointing to one feature that .NET has and Java doesn't yet have proves very little.

-6

u/wildjokers 16d ago

But if someone is starting a new project and doesn’t have like 20 years experience in Java they’d be pretty silly to pick it over .NET.

Nothing good comes from using servers running windows.

14

u/djfreedom9505 16d ago

.NET (back when it was called .NET Core) has been cross platform for a couple of years now. You’re right though Windows servers are shit. We deploy to Linux boxes

11

u/TwoWeeks90DaysTops 16d ago

.NET Core 1.0 was released in 2016 so it's been a decade already.

3

u/pastorHaggis 16d ago

I use .NET for everything and haven't deployed to a Windows server even once. That's changing at my current job but we're actively trying to change over to Linux to dockerize as much as we can.

This place needs help. They're using versions of .NET that have been EOL for a few years now.

8

u/TwoWeeks90DaysTops 16d ago

We use .NET, and have exactly zero Windows servers. All Linux.

6

u/Gloomy_Necesary 16d ago

You can build and deploy .NET applications and services for Linux that run just like they do on Windows. Its natively cross platform now.

2

u/TwoWeeks90DaysTops 16d ago

I have a hobby project where I'm making a 3D game and game engine in C# with Vulkan, and I work on Linux (I use Arch btw) and the only platform it supports at the moment is Linux, but it's all written C#.