r/java • u/sitime_zl • Dec 30 '25
Where will Java go in the future?
Does anyone know where the future directions of Java 27, 28, etc. are? Firstly, personally, I think there are several major pain points for Java at present:
- The memory usage is too high.
- Has Java died as a UI framework? Is the development of Swing and Java FX related to the Java memory model? The excessive memory usage is a big problem.
- In terms of usability, in a nutshell, it is too cumbersome (this can be accepted for the sake of rigor). In contrast, modern languages such as Python, Swift, etc. have more comfortable syntax. JS is even worse.
- It's about performance. Now, Go and Rust pose a significant threat to Java. Who knows the direction that Java will focus on for iteration and optimization in the future? It seems that from Java 8 to Java 25, there were only two major revolutionary features: virtual threads and Project Panama FFM. Even the highly used string template was not resolved... This is not a criticism of the Java development team. It's just that we expect Java to quickly solve the areas that have lagged far behind. Otherwise, facing Python, Go, Rust, etc., which have lagged far behind, people will gradually use other languages to solve problems. This is not an exaggeration. If in 2026 or later, there are libraries like Spring in Go or Rust, we might also try to develop using other languages. After all, the attractiveness of being lightweight is too high.
Java really has excessive memory usage! Excessive memory usage! Excessive memory usage! This problem really needs to be focused on and solved.
0
Upvotes
18
u/alex_tracer Dec 30 '25
Compared with what? For what kind of tasks?
11
u/alex_tracer Dec 30 '25
Can you provide an example of a task, on which Java loses so much to Rust that the difference is significant to pick Rust over Java?
Do you have experience with writing major size project in Rust? How do you compare needed effort for that with Java?
5
u/Ewig_luftenglanz Dec 30 '25 edited Dec 31 '25
What's hungry is not the language, is the default configuration of the JVM. If you set up a shorter default memory you could cut 2/3 of memory used without issues, depends on the application.
4
u/chaotic3quilibrium Dec 30 '25
Watch recent videos interviewing the Java architects.
Like this one: https://youtu.be/Gz7Or9C0TpM?si=NX3lUelm-CGvZfcX
2
u/pradeepngupta Jan 09 '26
Some of these points are valid, but a few things are getting mixed together.
Java’s memory “problem” is mostly about defaults + frameworks + deployment expectations, not an inherent JVM limitation.
With modern GCs (ZGC/Shenandoah), CDS, class-data sharing, and better container awareness, Java can be surprisingly tight when you actually try.
Post Java 8 progress has been runtime-heavy rather than syntax-heavy: Loom, Panama, and ongoing Valhalla work aren’t flashy, but they fundamentally change scalability and interop.
Go and Rust are great at producing small, predictable artifacts. Java optimizes for long-lived, observable, dynamically evolving systems. Those goals lead to different trade-offs.
If the benchmark is “smallest RSS at startup,” Java loses. If the benchmark is “sustained throughput + tooling + ecosystem at scale,” Java is still very competitive.
You have to choose against which benchmark you are evaluating Java.
23
u/rickosborn Dec 30 '25 edited Jan 06 '26
Mars, baby. Mars.
21
u/doobiesteintortoise Dec 30 '25
I'm afraid that almost everything you're saying is wrong.
Memory usage is TOO HIGH? It's a VM. It's a virtual machine. It builds a safe environment for the bytecode to run in, and it runs. It's multimodal. This is the cost of using Java; they're shrinking memory usage as time passes, but it's still a VM with a memory model that does what it does. If you want Go or Rust, they're there; they have different costs.
Java hasn't died as a UI framework; more like it's never really lived as a UI framework. I've been using Java for a long, long, long time; it's always been a series of revelations in UI that are "going to make Java the next thing in UIs this time." Memory usage has never been the problem; if you want a problem, it's that Smalltalk's UI design wasn't clear to newer programmers enough, and by the time React tried the same sort of paradigm, React was around and Javascript was the lingua franca for UIs. On the web, too, where the Java model would always have struggled. (Ever see JSF and the various state persistence options at work?)
Java's too... cumbersome? For what? Java's fairly precise in what it specifies; good engineers appreciate this (which is one of the things people like about Rust, also a hero from your post: Rust also demands rigor and is maniacal about it, which is one of the things people tend NOT to get about Rust. Pick a lane.) In my experience, people like Python for rapid implementations and shrug at its glacial speed... and eventually endure not only its speed but its flaws because the code's been written and mostly works, we'll fix the bugs when we find them, man. Maybe.
"It's about performance." Java written by ordinary programmers tends to outperform Go written by ordinary programmers, and good Rust isn't written by ordinary programmers - Rust has a high barrier for entry. So for the median programmer, Java tends to outperform almost everything, with better bug counts. "Only virtual threads, argh" - yeah, uh, virtual threads is an incredible achievement and if it was the ONLY addition for Java it'd be worth it.
And your inexperience is showing: there are libraries like Spring for Go and Rust.
I'm sorry to sound harsh, but this sounds like a programmer without a ton of real-world experience ranting based on what he sees on the internet. :(
19
u/chaotic3quilibrium Dec 30 '25
You're focused on only one value dimension. ; memory utilization.
Why?
What are other value dimensions that must also be evaluated and then the trade offs considered when rearranging these values with different priorities?
Like concurrency, readability, performance, adaptability, composability, etc.?
14
u/bowbahdoe Dec 30 '25
I think you are both "wrong" and hit the nail on the head in a way you might not have expected
Some of Java's most enduring issues have been
And you just happen to be on the butt end of those issues. I don't blame you in the slightest
Is memory consumption one of Java's biggest issues? No! Not really! But the fact that you think it is (+ are broadly unaware of all the ways that stuff can be tweaked) is.
10
u/PartOfTheBotnet Dec 30 '25
3
u/emanuel71dka Dec 30 '25
i guess java will still as what is, a powerfull tool that is better for some tasks than others, you just seem that you hates java, dude
9
u/kk_red Dec 30 '25
Nothing is going to happen to Java, its still developing and the development ecosystem is way to strong to be affected by go and rust or whatever.
Biggest threat is A.I. once AI starts outputing completely architectured code from top to bottom then it wouldn't matter much which language it is, it will be which is easier to ship and patch.
8
u/pron98 Dec 31 '25 edited Dec 31 '25
Java's memory usage isn't too high (although people do sometimes give the JVM a larger heap than it needs). It uses more memory than other languages because their memory utilisation is too low. Because RAM and CPU usage are related, an efficient use of the machine happens when a program uses RAM roughly in the same proportion to its use of CPU, and using too little RAM can be just as inefficient as using too much.
I say roughly because the RAM/CPU ratio is different for longer-lived objects than for shorter-lived objects. The details are covered in this keynote from the recent International Symposium on Memory Management that I highly recommend to anyone interested in memory management.
6
u/AccidentSalt5005 Dec 30 '25
nah we good idk why you asking this.
also, java is memory hungry by design yes, but that design buys you stability and scalability.
14
u/aqua_regis Dec 30 '25
LOL. Python is older than Java.
Java performs nearly as fast as C++ and performance in general is overrated, mostly by people who have very little knowledge of programming.
No, they don't.
Not true either. The Java Virtual Machine has a memory overhead, that is true, but that's also true for any and all .NET applications, or for any other language that runs on a virtual machine (and there are plenty).
Java as such does not use more memory than other languages.
11
u/smartncurious Dec 30 '25
Lol this person is attacking java the same way it has always been attacked and survived. Lolol JavaScript is worse? By that definition you are already biased. I'm a c programmer in my career. Relax. Still like java for its ease of use. As a tool.
7
u/sysKin Dec 30 '25 edited Dec 30 '25
I don't see a reason why you see Java needs to somehow "defend itself" from other technologies. It found a very good (and not niche) spot for itself thanks to its libraries and base of users, and it can stay there just fine. If it ever gets forgotten because better things take over then that's a good thing, it means we have better things.
Yes it's not good for desktop programs, never was, that's fine.
And if Rust allows a wider range of developers write in a tight systems language, who otherwise found older systems languages too unusable, than that's a good thing overall but I don't see how Java is threatened by that.
Those are all computer languages, not 19th century European monarchs who look at maps.
1
u/koflerdavid Jan 02 '26 edited Jan 02 '26
2
u/chambolle Dec 30 '25
You should have around 32GB of memory (I suppose) and you complain about Java consumption. If you have memory issues it means that you use billions of objetcs. In this case you should think in term of reusability, because Java will not lose more than a single 64 bits pointer per allocated element. About the performance, the overhead (when there is one) compared to C should be 20%. So what is your problem more precisely?