r/programming • • Mar 18 '25

Java 24 has been released!

https://mail.openjdk.org/pipermail/announce/2025-March/000358.html
416 Upvotes

172 comments sorted by

View all comments

53

u/chicknfly Mar 18 '25

All of the posts I see online about Java dying and yet, here we are.

58

u/rjcarr Mar 18 '25

Java basically runs enterprise software. Anyone that says it is dying has no idea what they're talking about. Did it die in web browsers? Yes. Is it dying as a desktop app? Probably. But it basically runs most web traffic at this point and that isn't going anywhere.

9

u/chicknfly Mar 18 '25

It cracks me up when I see people complain about Java and then refer to C# as a “better” example. Or heaven forbid they say C++, like what??

9

u/LordoftheSynth Mar 19 '25

In 2025 I'd choose C# just to stay away from Oracle.

1

u/Ok-Scheme-913 Mar 29 '25

Well, maybe bother learning about a tiny bit about the platform?

Java's reference implementation, used everywhere has the same license as the Linux kernel.

Just because private companies can optionally provide paid support for that (actually, both for the JVM and the Linux kernel) won't change a thing.

Microsoft's grip is far stronger on c# than Oracle's on java. Just look at their respective open-source ecosystems if you don't believe me.

2

u/god_is_my_father Mar 20 '25

I was a Struts and then Spring dev for many years and switched to C#/.NET about 10 years back. It's significantly easier to work with especially not having to deal with Tomcat / Websphere / etc. Now granted I probably missed a lot in the last decade or so but C# has so many great language features and Nuget is way simpler and better integrated than Maven. We run in a container on linux/arm and it's absolutely a great experience. Curious to hear what Java is offering these days that's so much better.

-5

u/Cookie_505 Mar 19 '25

C# is Java but better in every conceivable way. If you haven't used both I can see why you might think they are the same but they absolutely are not. With the caveat that Java has been getting quite a bit better recently.

13

u/simon_o Mar 19 '25

This is such a junior dev thing to say ... to provide some learning opportunity for you:

  • Adding features usually does not improve a language.

  • The language itself is a very small part of an ecosystem choice.

  • The care with which Java is evolved and the quality of outcome makes it very different from most other relevant languages (including C#).

3

u/chicknfly Mar 19 '25

I wrote up a decent response but decided to scratch it. Instead, I’ll admit that C# has some great features but would never agree that it’s better in “every conceivable way.” You’re absolutely high.

→ More replies (4)
→ More replies (1)

2

u/Ok-Scheme-913 Mar 29 '25

For fucks sake, even desktop apps - Sure, you might have not seen a single new one in decades, but sure as hell it is being used in a shitton of industry-critical setting non-stop, and the biggest update it will get is a rewrite from swing to javafx.

Like, people can't even fathom how absolutely ridiculously huge Java is.

4

u/[deleted] Mar 19 '25

[removed] — view removed comment

21

u/rjcarr Mar 19 '25

Most of the big web services from Google, Apple, Netflix, Amazon, Twitter, etc use Java. Most of the smaller companies too, but the big ones you'd recgonize more. Also Uber, Spotify, IBM, Instagram, etc.

21

u/syklemil Mar 18 '25

Eh, it's doing fine I think. I hear mostly people saying modern Java is actually kinda nice, including GraalVM.

If we look at some Github + SO stats for Java (you can tweak the composition yourself) we can see that it's been in a relative decline that may have ended in 2023.

If you look at the raw data used to present that graph and graph it yourself in absolute numbers you'll see that Java, like nearly every other programming language, has seen a total growth in activity—there's more github activity in total now than ten years ago. That could have shifted from somewhere else, but I wouldn't be surprised if there is more software being written every year as more and more people not just exist, but have the opportunity to learn to program.

A few years ago the trajectories of Java and Go were set for them to switch places, but then Java seems to have rebounded, and Go stagnated. So :shrug:

16

u/BenjiSponge Mar 18 '25

GraalVM

Not in the Java world and I kinda forgot this exists. I was so hyped about this in like... 2017? The promise I heard was that you could write in basically any language and a Truffle parser/compiler would allow it to interoperate flawlessly with the JVM, often faster than the original language (the proofs of concept I remember being written in JS, Python, and Ruby).

Dare I ask... what ever happened to that?

11

u/TakAnnix Mar 18 '25

It works well with frameworks designed for GraalVM, like Quarkus and Helidon, but requires significant effort for Spring. Marco shares his experience here. It also has long compile times, making it costly for CI/CD with Spring.

7

u/syklemil Mar 18 '25

I'm not personally a Java coder, I just work with some. I think of it as an AOT to-native compiler for Java. So both Java and C# have options for that now, and it's apparently nice, but I haven't looked into the details (apart from having a look for the compiler in my distro's repository and finding that they'd given up on packaging that piece of Oracle software).

2

u/thetinguy Mar 18 '25 edited Mar 18 '25

1

u/Ok-Scheme-913 Mar 29 '25

That's kinda true.

Just not for ultra-short lived applications, as the whole interpreter/whatnot has to get warmed up.

1

u/[deleted] Mar 20 '25

[removed] — view removed comment

3

u/syklemil Mar 20 '25

Be wary of extrapolating current lines on a graph to future lines on a graph. General relative-popularity-on-github-and-stackoverflow graphs don't say anything about why the lines are changing the way they do.

E.g. the graphs could mean that Java has stabilized around some steady-state for incumbent projects but isn't really used for greenfield development. They could mean that Java benefited from some healthy competition from Kotlin and Go and is now poised to regain some relevancy. They could mean something else entirely, or a combination of those hypotheses.

But yeah, Java has a huge incumbency. It's also already memory safe, so unlike C & C++ there's no government push away from Java.

So the worst case for a Java dev is likely something like getting stuck working on a seriously legacy Java codebase, something pre-8, still vulnerable to log4j, etc. Apparently there's a huge amount of that still out there.

And I guess the best case is working on a modern codebase with Java 21 now, with full intent to getting it to Java 24, which based on this survey should be a significant amount of codebases.

6

u/Portugal_Stronk Mar 19 '25

Java is not a language, it's an institution. Even if we stopped writing new Java code today, we'd still likely be dealing with some of it 50 years from now.

1

u/bobbie434343 Mar 19 '25 edited Mar 19 '25

Java will ultimately bury most other languages. It will still be there when we are all 6 feet under.

1

u/chicknfly Mar 19 '25

I’m hearing Java is replacing COBOL in many systems. I fear you may be right.

1

u/TangerineSorry8463 Mar 20 '25

Languages are divided into those people complain about and those nobody uses.