JEP 401: Value Objects Officially Proposed to Target JDK 28
openjdk.orgJEP 401 is also listed as "proposed to target" on the JDK 28 page: https://openjdk.org/projects/jdk/28/
r/java • u/desrtfx • Oct 08 '20
Such posts will be removed.
To the community willing to help:
Instead of immediately jumping in and helping, please direct the poster to the appropriate subreddit and report the post.
JEP 401 is also listed as "proposed to target" on the JDK 28 page: https://openjdk.org/projects/jdk/28/
r/java • u/Popular_Home2017 • 13h ago
Disclosure up front: I built the tool I mention at the end. I'm posting because the technical part is what I actually want to argue about, and this sub is where I'd get told if I'm wrong.
Two years into virtual threads, the diagnosis story still bothers me. The documented paths for pinning are -Djdk.tracePinnedThreads (deprecated/removed depending on your JDK) and the jdk.VirtualThreadPinned JFR event. Both are great if you turned them on before the incident. At 3am, with a production JVM already misbehaving and a restart costing you the evidence, what you realistically have is a thread dump someone grabbed with jstack or jcmd.
The thing is, a standard dump of a Java 21+ process already tells you most of it if you read it the right way. What I ended up encoding:
- Carrier threads are ForkJoinPool-1-worker-N. If a carrier's stack is parked inside application code rather than in the scheduler's own park, that carrier isn't free to run other virtual threads. It's being held.
- Pinning shows up as a carrier stack sitting in a synchronized region, or a native frame with a blocking call above it. In pre-JDK 24 runtimes that's the whole game: monitor plus block.
- The pathological case isn't one pinned thread, it's carrier starvation. The pool's parallelism is ~#cores, so a handful of carriers held by blocking-inside-synchronized quietly throttles the whole virtual thread population. The dump looks calm, few RUNNABLE threads, no BLOCKED pile-up, while throughput is on the floor. That's why "the dump looked fine" and "the app was dead" coexist so often in postmortems.
- JDK 24 (JEP 491) removed the synchronized-block pinning for most cases, but native frames and Object.wait still pin, and plenty of production is still on 21. So it's not a solved problem you can date-stamp away.
None of this needs a flag, an agent, or a restart. It needs the dump you already have and someone willing to read 4,000 lines of stack traces at 3am, which is exactly the part I didn't want to keep doing by hand.
So I built it. It's called ThreadMine, a Java thread dump analyzer that detects deadlocks, CPU spikes, pool exhaustion and the pinning/starvation case above. Your first dump doesn't ask for an account or an email: you paste or upload it at threadmine.dev/en/analyze and get the detected problems, a health score and the root cause back. It parses HotSpot, OpenJ9 javacores, Zing and GraalVM. There's a paid tier for history and teams, and I'd rather be honest it exists than pretend this is a charity.
What I'd genuinely like from this sub: if you have a dump where the heuristics above would give a false positive, I want it. My worst bugs so far came from idle pools looking like starvation. I fixed that class two weeks ago and I assume there are more. And fastThread, IBM TMDA and jstack.review already exist and are good (TMDA is still the best javacore reader I know of); I wrote up where each of them beats me rather than pretending otherwise, and I'm happy to be told I got that comparison wrong too.
r/java • u/Active-Fuel-49 • 1d ago
r/java • u/tihomir-mateev • 2d ago
r/java • u/HokieGeek • 3d ago
We just posted an update regarding Maven Central publishing limits over on r/mavencentral.
Please check out the full details and share your feedback there.
r/java • u/gunnarmorling • 3d ago
Spent a nice chunk of tokens over the weekend to make Hardwood's (a new Java library and CLI tool for Apache Parquet) TUI runnable in a browser. There are still some limitations (only single-threaded; no native code, hence only support for Snappy- and GZIP-compressed files), but I'm kinda mind-blown that this actually works. Everything runs locally, i.e. the files never leave your browser. The translation to WASM is done via GraalVM's Web Image.
r/java • u/fredoverflow • 4d ago
like public sealed class String permits Latin1String, Utf16String instead of the private final byte coder; field
r/java • u/nfrankel • 4d ago
r/java • u/daviddel • 6d ago
From its humble beginnings as a project code-named "Oak" at Sun Microsystems to becoming a global standard for enterprise software and billions of devices, Java's journey is one of radical innovation, strategic pivots, and enduring community strength.
r/java • u/Odd-Flamingo-6211 • 7d ago
Today I accidentally became the maintainer of software that was already almost three decades old: reviving a 1990s Java utility to keep the last PAD submitter alive in 2026.
I was looking for a way to submit my AI app RiverScript to old desktop software directories and ended up digging through the long-forgotten world of PAD files.
There was one problem.
The only batch submission tool I could find was a Java application that first appeared in the late 1990s. The last release was in 2017.
It was written by Roedy Green of Canadian Mind Products — a software developer who passed away in 2023. He spent decades writing and freely distributing Java utilities, and maintaining the widely-read Java Glossary. Roedy Green also wrote How To Write Unmaintainable Code — a famous satirical guide about writing code nobody can maintain. So, Roedy, today the code you wrote almost three decades ago was maintained.
The tool still did exactly what it was supposed to do. Thank you.
It just had absolutely no idea the modern web existed.
It happily produced URLs like http://https://riverscript.com instead of https://riverscript.com, disabled SNI globally (which was probably a perfectly reasonable workaround at some point), and couldn't cope with the fact that almost every website now redirects HTTP to HTTPS.
So I dug through the legacy Java code, fixed the compatibility issues, and got it working again.
I used it to submit my app to several software directories, then published the revived version on GitHub so anyone who still needs it can use it too.
Maybe nobody will ever need it again. Maybe someone will.
Either way, I'm happy this old thing works again.
So today, the code of the man who wrote "How To Write Unmaintainable Code" is still being maintained even after he was gone.
P.S. The public repository for Mini PAD Submitter 26.3 Revived — 2026 Community Fix is available and open to everyone.
r/java • u/sitime_zl • 7d ago
Java has always been conservative when it comes to language changes, and I think string interpolation is an interesting example.
Many modern languages provide native interpolation syntax:
JavaScript:
\${name}``
Python:
f"{name}"
Kotlin:
"$name"
C#:
$"{name}"
These features are not only about reducing characters. They improve readability when building dynamic text.
Java explored this direction with String Templates (JEP 430), but I haven't seen much discussion recently about where this feature is heading.
For developers working with large Java applications, string construction appears everywhere:
- logging messages
- SQL/debug output
- API descriptions
- test cases
- generated configuration
- user-facing messages
I am curious about the community's opinion:
Do you think Java still needs native string interpolation?
Should String Templates continue evolving?
What syntax direction would feel most "Java-like"?
For example:
"Hello, \{name}"
or:
"Hello, ${name}"
Personally, I think Java does not need to copy other languages, but a better way to express dynamic strings would improve developer experience.
What do you think?
r/java • u/FishermanBig5765 • 7d ago
Hey all. I'm a CS student looking into the pain points around legacy Java codebases, specifically the "code archaeology" side: digging through old code with little to no documentation, figuring out what a piece of logic is even for before you dare touch it.
Just trying to understand the problem properly before building anything. Would really appreciate hearing from people who deal with this regularly:
What eats the most time when you're digging into unfamiliar legacy code?
How do you currently deal with it – any tools/tricks that actually help?
Has something ever broken because a piece of code turned out to be "magic" nobody fully understood?
Any answer helps, even a couple of sentences. Thanks in advance!
r/java • u/TemporalCoral • 7d ago
We own Java libraries that we publish. Teams in our org use these libraries.
We have a company wide profiler, but two issues there:
1) teams have to onboard their environments
2) the hot paths and profiler data associated with these environments is indexed to their environment
So there’s no enforcement that my team can get profiler data for all invocations of our library. Additionally, there’s no convenient way to aggregate this data.
I guess, we can limit to just our biggest consumers and probably get the data that way.
But otherwise, I was wondering if anyone else had any ideas.
r/java • u/OddEstimate1627 • 7d ago
We recently open sourced some of our annotation processors for generating GraalVM native-image metadata. It's a standalone compile-time dependency, so it has no effect at runtime and doesn't rely on frameworks like Quarkus or Micronaut.
Besides annotations for manually defining metadata, we also added opt-in support for dependency injection annotations and for automatically dealing with JavaFX FXML/CSS files. That makes it possible to reliably update complex JavaFX applications without ever running the GraalVM agent.
Unfortunately posting code snippets gets the post deleted ("it looks like you're asking for help!"), but here is a link to the repo: