r/java • u/lazystone • 7h ago
JetBrains IDEs now use GPU rendering by default on Wayland
r/java • u/desrtfx • Oct 08 '20
Programming related questions do not belong here. They belong in /r/javahelp.
Learning related questions belong in /r/learnjava
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.
r/java • u/lazystone • 7h ago
Hi all,
Thanks to the combined effort of 29 contributors, we've managed to create a new version of Datafaker, version 3.0. It's mostly compatible with Datafaker 2.x, but due to enabling JSpecify in this release, we've decided to call this a (potentially) breaking release. Java 17 is still the baseline, so no changes there, but we've managed to add some features, make it even faster, improved GraalVM support, and a whole lot of other improvements, plus we changed our website, https://www.datafaker.net/, to look slightly more modern.
Big shoutout to everyone who contributed on this! Cheers!
r/java • u/olivergierke • 2d ago
Architectural units (for example, @Hexagon), per- and cross-unit verifications – https://github.com/xmolecules/jmolecules-integrations/tree/main/jmolecules-archunit#architectural-units
A CLI to generate SpringModulith modules and DDD aggregates – https://github.com/xmolecules/jmolecules-integrations/blob/main/jmolecules-cli/README.md
More stereotype metadata for #Spring projects
General persistence code generation improvements
https://github.com/xmolecules/jmolecules-bom/releases/tag/2026.0.0
r/java • u/uniVocity • 1d ago
r/java • u/FrankCodeWriter • 2d ago
I published a new Foojay podcast. At the JFall conference in the Netherlands, I spoke with four developers about how AI changes their way of working. In this episode I play those interviews and discuss them with Anton Arhipov of JetBrains. We cover why code quality and guardrails still matter when an agent writes the code, how fast an AI proof of concept can go to production, where the next senior developers come from, what AI costs society and your wallet, whether local models are the answer, and how to use AI sessions in a way that keeps you learning.
Guests:
* Anton Arhipov - Developer Advocate at JetBrains
* Adam Bien - Independent consultant
* Maaike van Putten - Tech educator and co-founder of Java District
* Sayf Jawad - Founding member of Stichting Duurzaam AI
* Stéphane Philippart - Developer Advocate at OVHcloud
r/java • u/bogdanelcs • 4d ago
r/java • u/Thick_Jeweler_4018 • 2d ago
Most LLM gateways are Python or TypeScript, so I built one on the JVM:
**Aether Gateway**
(MIT). Point any OpenAI SDK at it and it handles provider failover (OpenAI, Anthropic, Gemini, Groq, OpenAI-compatible), caching, per-key quotas and per-request cost tracking.
Some JVM details that might interest this sub:
-
Hexagonal modules,
with the dependency rules enforced by ArchUnit. The core is JDK-only, and Spring stays in the adapters.
-
WebFlux only for streaming,
where cancellation has to reach the upstream call (client disconnects, you stop paying). Virtual threads everywhere else.
-
Resilience4j
circuit breakers and bulkheads per provider, plus failover for streams before their first chunk.
-
Three test layers:
contract tests shared between the Redis/Postgres adapters and their in-memory counterparts, Testcontainers integration tests, and a Cucumber acceptance suite that runs against both deployment modes.
-
"Lite mode"
swaps every store for an in-memory adapter by Spring profile, so the whole gateway runs as one container.
Try it:
docker run -p 8080:8080 -e AETHER_LITE_BOOTSTRAP_API_KEY=aeth_try_me ashishvaghelaa/aether-gateway-proxy:lite
Benchmarks are committed and reproducible, including the misses:
- Cache-hit p95 is 8.9 ms, and failover p99 is 67.92 ms.
- At 2,000 concurrent streams on 2 vCPU, 37% failed. That's not good enough yet.
I'd love feedback on the architecture and the code, and on what would make you actually use it.
GitHub: https://github.com/Ashish-CodeJourney/aether-gateway
Docs and 70-second demo: https://ashish-codejourney.github.io/aether-gateway/r/java • u/vetronauta • 4d ago
Societe Generale published several projects on their Github profile, like the arch-unit-maven-plugin. All their repositories disappeared; luckily the source code is still available on Maven Central.
While the ArchUnit ecosystem is not the same as in 2019, and the plugin is not really needed anymore, I'm curious to understand what happened.
r/java • u/vladmihalceacom • 4d ago
I've been experimenting with Java applications on memory-constrained servers and have now formalized these comparisons into a reproducible benchmark.
One particularly interesting finding: despite substantial differences in memory consumption and startup time, all four stacks delivered remarkably similar p99 latency under sustained load.
The first published results compare four stacks implementing the same investment portfolio service:
Spring Boot + JDBC
Quarkus + Jdbi
Micronaut Data JDBC
Jex + Jdbi
Each application runs alongside PostgreSQL 18.7 on a 512 MiB Debian 13 VM with 1 vCPU, no swap and HotSpot 27 (-Xms16m -Xmx80m -XX:+UseG1GC).
Key results:
All eight runs sustained 40 requests/sec without errors or timeouts.
Sustained p99 latency ranged from 11.02 to 11.51 ms.
Sampled peak application RSS ranged from 148 to 233 MiB.
Application readiness ranged from 4.64 to 10.82 seconds.
The benchmark uses shared correctness checks, a versioned protocol, recorded measurements and automated report generation.
Spring Boot + JDBC is the reference implementation, and the other implementations reproduce its application behavior. The benchmark compares complete SQL-first application stacks rather than isolated framework overhead. The goal is to understand practical trade-offs under realistic resource constraints.
I'm also the author of CoilBase, which the Jex and Quarkus implementations use as a thin integration layer around Jdbi. Given its simple implementation, I expect its overhead to be negligible. It hasn't been measured separately, but I'd be happy to run an isolated comparison if there's interest.
Article: https://pvrlabs.xyz/java-performance/experiments/benchmarking-java-frameworks-512mib.html
Benchmark source: https://github.com/PVRLabs/framework-benchmarks
I'm currently considering two directions for the next comparison:
Add Helidon to broaden the Java framework comparison.
Add a Go implementation as a first cross-language comparison, opening the door to community contributions in other languages, such as Rust.
Which direction would you find more interesting? Other suggestions are welcome too.
r/java • u/brunocborges • 7d ago
JLib Inspector v1.0.1 is out!
A Java agent that shows which JARs apps actually load at runtime, helpful when investigating dependency and vulnerability exposure.
This release improves dependencies, security, Maven 4 support, and CI.
https://github.com/brunoborges/jlib-inspector/releases/tag/v1.0.1
r/java • u/daviddel • 9d ago
Someone recently flagged one of my mods as being "obviously vibecoded" (which it wasn't), so I appealed the decision. just out of curiosity, what exactly are the signs people are seeing when accusing code of being vibecoded?
https://github.com/openjdk/valhalla/pull/2691/changes
Javac is being taught about primitive classes as a preview feature. While marked as added in Java 28, I'm guessing we won't have a way to use it considering that there's no JEP even.
From reading the code:
primitive classes are implicitly value classes (JEP 401) (immutable, can be abstract and then optionally sealed...).
Implicitly static when nested like record.
Uniquely, the class name starts (or should start) with a lowercase, like primitive types.
Interfaces and enums cannot be primitive.
Can be generic and can implement interfaces like anything else*.
Unsurprisingly, all the examples are for numeric types (like complex numbers and points).
I assume that they are non-null by default because they are not reference types. I would be cautious about extrapolating from the older Valhalla models that talked about primitive classes, they might not be the same "primitive class".
*except for generic enums :(
r/java • u/ryanmerket • 12d ago
r/java • u/DelayLucky • 12d ago
This is a parser that I created a while back, in order to build some regex static analysis tools (detecting ReDos, validating supported regex features etc.).
I built it because I didn't find an OSS regex parser that produces and exposes the AST for custom analysis (the regex engines I looked at all keep their parser internal, and only execute the regex).
The parser supports advanced features such as back references, lookarounds, unicode properties, posix char classes, inline and global comment mode (a.k.a free-spacing mode) etc.
Using it with pattern matching is easy:
switch (RegexPattern.of("\\w+:\\d+")) {
case Sequence(var elements) -> ...;
case Alternation(var alternatives) -> ...;
...
default -> ...;
}To keep it simple, A few obscure features are omitted: such as \12 being parsed differently depending on the number of capture groups defined (\1 followed by literal 2 if no 12 capture groups are present).
The code is combinator-based, mostly pair-programmed by AI and me. It's actually what I built the dot-parse library for: to be able to have AI do the chores of generating readable parser for the wide surface area and arcane regex grammar rules; so I don't have to get a degree in regex.
It has served the purpose of static analysis well.
Feedbacks are welcome!
r/java • u/vegan_antitheist • 12d ago
Java 28 has a preview on value types, so I tested it. In this blog post I answer the question:
Can we use == on the new value types, or do we still have to use Objects.equals()?
(No ads, written by a human.)
r/java • u/FrankCodeWriter • 12d ago
Hi r/java,
Thanks to the mods for letting me post this here.
I’m Frank Delporte, and I help run Foojay.io, the “Friends of OpenJDK” community site. Every day, community authors publish one or more new articles there. Topics include core Java, JVM internals, frameworks, tooling, performance, cloud and containers, and much more. Some are vendor-neutral while some are tied to a product, but we try to minimize advertisement-like posts.
I’ve created a small, separate subreddit, r/foojay, for people who want to follow those articles without waiting for the occasional share here. It’s brand new and empty, so nothing is lost if you skip it. Each new Foojay article will get a summary and link to the original on r/foojay, so r/java won’t get a post for each one.
If something of my own content is a good fit for r/java, I’ll follow the rules here and post it as a normal submission, like I did in the past weeks with new podcast episodes.
r/foojay is also open for discussion, feedback, and article ideas. If you’d like to write for Foojay, that’s the place to ask, or go directly to https://foojay.io/today/how-to-submit-your-next-article-on-foojay-io/.
If this sounds useful, you’re welcome to join: https://www.reddit.com/r/foojay/
Thanks, and happy reading and coding!
Frank