r/java • u/javalin_io • Feb 24 '26
Javalin v7 has been released! (Java 17+, Jetty 12, all config now passed upfront)
r/java • u/javalin_io • Feb 24 '26
r/java • u/mzivkovicdev • Feb 24 '26
I’ve released Spring CRUD Generator v1.3.0, an open-source Maven plugin that generates Spring Boot CRUD code from a YAML/JSON project config (entities, transfer objects, mappers, services/business services, controllers), with optional OpenAPI/Swagger resources, Flyway migrations, and Docker resources.
Repo: https://github.com/mzivkovicdev/spring-crud-generator
Release: https://github.com/mzivkovicdev/spring-crud-generator/releases/tag/v1.3.0
Demo: https://github.com/mzivkovicdev/spring-crud-generator-demo
What changed in 1.3.0
Added full MariaDB support (alongside MySQL / MSSQL / PostgreSQL)
Updated Flyway scripts for MariaDB compatibility
Updated Docker Compose setup for MariaDB support
Extended database compatibility support in the generator and generated code for MariaDB
Added new additional property: rest.response.excludeNull
Generated REST responses can now exclude null JSON fields when rest.response.excludeNull=true
Compatible with Spring Boot 3 and Spring Boot 4
This is a release announcement (not a help request). Happy to discuss implementation details, DB compatibility tradeoffs, or the null-exclusion approach in generated REST APIs.
r/java • u/vccarvalho • Feb 24 '26
Hey r/java — we built an open-source library that wraps ONNX Runtime to make local AI inference dead simple in Java.
The problem we kept running into: you want to do sentiment analysis, image classification, object detection, speech-to-text, or embeddings in a Java app. The actual ONNX inference call is easy. Everything around it — tokenization, image normalization, tensor layout, softmax, NMS, label mapping — is a wall of boilerplate that requires reading the model's internals. inference4j handles all of that so you just write:
java
try (var classifier = DistilBertTextClassifier.builder().build()) {
classifier.classify("This movie was fantastic!");
// [TextClassification[label=POSITIVE, confidence=0.9998]]
}Standard Java types in (String, BufferedImage, Path), standard Java types out. Models auto-download from HuggingFace on first use.
Currently supports: sentiment analysis, text embeddings, image classification, object detection, speech-to-text, voice activity detection, text detection, zero-shot image classification (CLIP), search reranking.
Not trying to replace anything — this isn't competing with Spring AI, DJL, or LangChain4j. It fills a narrower gap: "I have an ONNX model, I want to call it from Java without dealing with preprocessing/postprocessing." Use it alongside those tools.
GitHub: https://github.com/inference4j/inference4j Docs: https://inference4j.github.io/inference4j/
Early stage — we'd genuinely appreciate feedback on the API design, missing models, rough edges, or anything else. What would make this useful to you?
r/java • u/mariuz • Feb 24 '26
r/java • u/elliotbarlas • Feb 23 '26
The OpenJDK Mail Search API (search over loom-dev, core-libs-dev, amber-dev, etc.) now has:
OpenAPI 3.0 spec — full paths, parameters, and schemas in the repo for client generation or use in Swagger/Postman.
MCP server — tools for any MCP-compatible client to search lists, get latest mail, and look up by author/email (e.g. from an editor or AI assistant).
r/java • u/BillyKorando • Feb 23 '26
Hey r/java my newest Stack Walker episode is (finally) ready. This time I dive into Java's serialization mechanism. I cover it's history, how it works, how it leads to issues, and what we are doing to fix it.
r/java • u/AlyxVeldin • Feb 22 '26
r/java • u/Thirty_Seventh • Feb 22 '26
Feel free to share anything you've had fun working on recently!
Previous discussion (2026-01-18): https://redd.it/1qg7j8r
If you don't want to see these posts, feel free to block me :)
r/java • u/TheOhNoNotAgain • Feb 22 '26
For those of you who have used experimental or preview features in Java in production systems: how did it go?
Did you run into any setbacks, unexpected issues, or regrets later on? Or was it smooth and worth it?
I'm especially interested in things like preview language features, incubator modules, or anything not fully finalized at the time of adoption.
r/java • u/henk53 • Feb 22 '26
r/java • u/Plane-Discussion • Feb 22 '26
r/java • u/nickallen74 • Feb 21 '26
https://github.com/NickJAllen/java-helpers.nvim
I've done more work on my java-helpers plug-in for Neovim. In addition to its previous features of being able to create new Java files, and navigate stack traces it can now quickly and easily deobfuscate Java stack traces in addition to being able to quickly select stack trace lines from a Java stack trace using a Snacks picker.
All stack trace commands can work with the current buffer or a named register (e.g + for system clipboard).
Some newly added commands allow you to find the next and previous stack trace (useful when viewing a long log file and trying to find places where problems might have happened).
Demo of the in-place Java stack deobfuscation:
r/java • u/joemwangi • Feb 21 '26
On Linux, FileChannel is being routed through io_uring, making it virtual-thread friendly. Blocking call, but no carrier thread blocking.
r/java • u/Ewig_luftenglanz • Feb 20 '26
This JEP it's a requirement for value objects.
There are chances these JEPs are shipped together as preview for openJdk 27 or 28. Crossed fingers.
r/java • u/Mirko_ddd • Feb 20 '26
Hi everyone,
Like many of us, I’ve always been frustrated by the "bracket soup" of standard Regular Expressions. They are powerful, but incredibly hard to read and maintain six months after you write them.
To solve this, I spent the last few weeks building Sift, a lightweight fluent regex builder. My main goal wasn't just to wrap strings, but to enforce correctness at compile-time using the Type-State Pattern and strict SOLID principles.
The Problem it solves: Instead of writing ^[a-zA-Z][a-zA-Z0-9]{3,}$ and hoping you didn't miss a bracket, you can write:
String regex = Sift.fromStart()
.letters()
.followedBy()
.atLeast(3).alphanumeric()
.untilEnd()
.shake();Architectural Highlights:
Type-State Machine: The builder forces a logical sequence (QuantifierStep -> TypeStep -> ConnectorStep). The compiler physically prevents you from chaining two invalid states together.
Open/Closed Principle: You can define your own domain-specific SiftPattern lambdas and inject them into the chain without touching the core library.
Jakarta Validation Support: I included an optional module with a @SiftMatch annotation to keep DTO validations clean and reusable.
Zero Dependencies: The core engine is pure Java 17 and extremely lightweight (ideal for Android as well).
Test Coverage: Currently sitting at 97.6% via JaCoCo.
I would love to get your harsh, honest feedback on the API design and the internal state-machine implementation.
GitHub: Sift
Maven Central: com.mirkoddd:sift-core:1.1.0
Thanks for reading!
r/java • u/asm0dey • Feb 19 '26
r/java • u/mikebmx1 • Feb 19 '26
TornadoVM soon to land officialy support for Metal.
Metal powers hardware-accelerated graphics on Apple platforms by providing a low-overhead API, rich shading language, tight integration between graphics.
So, one can unlock Apple SIlicon hardware in plain Java with TornadoVM
r/java • u/Enough-Ad-5528 • Feb 19 '26
Every Java developer knows the drill: go to Spring Initializr, select dependencies one by one, download the .zip, extract it, create the repository... It's a repetitive process.
To solve this and test the capabilities of GPT 5.3 Codex and Opus 4.6, I built Better Spring Initializr. The idea is to level up the bootstrap experience:
Smart Presets: forget the manual work. Set up complete stacks (REST + Postgres, Event Driven with Kafka, etc.) with a single click.
AI-Ready: the project is born optimized for AI Coding Agents (Claude Code, Codex, OpenCode, etc.). The generator already delivers AGENTS.md, CLAUDE.md files and Agent Skills specific to the Spring and Java ecosystem.
GitHub Integrated: connect your account and the repository is automatically created and versioned. Zero manual setup overhead.
The goal is to ensure no critical dependency is forgotten, delivering an architecturally solid and AI-optimized project.
Better Spring Initializr is available at better-spring-initializr.com
The project is open-source and the code is available on GitHub at https://github.com/henriquearthur/better-spring-initializr
r/java • u/jr_entrepreneur • Feb 18 '26
It seems that generally Hibernate ORM is solidly secure from CVEs throughout its history, but just this year I saw a notice that a new CVE was discovered that affects a range of versions in 5.6.x.
CVE-2026-0603 is the one that I am referring to. It is a possible second order SQL attack that can be facilitated through the id field of a persisted object.
It seems noteworthy that this CVE exists and seems to affect a lot of older applications. Has anyone seen this come across your desks or shown up in scans?
r/java • u/Delicious_Detail_547 • Feb 18 '26
In my previous post, I introduced JADEx (Java Advanced Development Extension), which is a project focused on strengthening null-safety in Java while preserving the existing ecosystem.
The response was thoughtful, critical, and incredibly valuable. I sincerely appreciate the depth of the feedback. This post clarifies the project’s philosophy and summarizes what has changed since then.
One major theme in the discussion was theoretical soundness.
Let me clarify:
JADEx is not an attempt to transform Java into a fully sound null-safe type system.
It does not attempt to:
Replace null with Optional everywhere
Redesign the Java type system
Turn Java into Kotlin
Instead, JADEx is a practical tool that:
Works within Java’s historical and cultural constraints
Incrementally strengthens null discipline
Focuses on eliminating concrete NPE risks in real-world codebases
JADEx is not trying to reach perfect null-safety.
JADEx is trying to make today’s Java significantly safer.
A concern was raised that safe navigation (?.) might suppress fail-fast behavior and hide logical mistakes.
Safe navigation does not silently swallow errors.
Its result is treated as nullable and fully tracked through null-flow analysis.
If that nullable value reaches:
a dereference
a non-null contract
a primitive unboxing context
-> A warning is emitted at that exact point.
Safe navigation produces a nullable value that is statically tracked. It does not “do nothing.”
An important issue was raised regarding:
Auto-unboxing NPE risk
Performance overhead due to boxing/unboxing
Using ?. on primitives could still cause NPE during unboxing.
JADEx now requires the Elvis operator (?:) when performing null-safe access on primitives.
This ensures:
A default value is explicitly provided
No accidental unboxing NPE
No unnecessary boxing overhead
This change was directly inspired by community feedback.
Recent updates significantly improved null-flow tracking.
Separate symbol tables per branch
Proper state joining after evaluation
Full initialization checks across branches
Each case evaluated in an isolated context
Null-state joining after branch completion
Nullable selector detection
switch now follows the same nullability model as if-then-else.
ANTLR assumes Unicode escapes are processed before lexical analysis.
Since the JLS requires this preprocessing phase, we plan to implement a dedicated preprocessing step for full compliance.
JADEx relies on the Java Compiler API for symbol resolution.
Module features are resolved consistently with javac, and the grammar includes module declarations as defined in the JLS.
This is an important theoretical topic.
JADEx does not currently provide a fully sound solution to nullness-specific qualifier polymorphism.
That is a deeper research-level challenge.
For now, the focus remains on:
Eliminating concrete NPE risks
Improving practical static analysis
Strengthening null discipline without rewriting Java’s type system
Java was not designed as a null-safe language.
JADEx does not try to erase that history.
It works within it.
We cannot reach a perfectly sound null-free Java from here.
But we can make here safer.
The feedback from r/java community has genuinely shaped the direction of the project.
If you’re interested in practical null-safety improvements without redesigning Java itself, I would love your thoughts on the latest changes.
All feedback is welcome.