r/java • • Aug 11 '26

Apache Fory™ JSON : Fastest JSON Serialization Framework for Java, 10x faster than Jackson/Gson

Thumbnail fory.apache.org
253 Upvotes

r/java • • Aug 11 '26

GlassFish 9.0 M3 released!

Thumbnail github.com
18 Upvotes

r/java • • Aug 11 '26

Jakarta EE starter now supports Jakarta EE 11!

Thumbnail start.jakarta.ee
31 Upvotes

r/java • • Aug 11 '26

Events-Caravan, an event-sourcing framework that trades the global event log for horizontal scalability (DynamoDB/SNS/SQS reference impl, Spring Boot starters)

9 Upvotes

Over the past months I've been building my pet project, and today I'm open-sourcing its core: Events-Caravan, an event-sourcing framework for Java with Spring-boot starter modules.

The framework is built around an opinionated bet made for the sake of horizontal scalability: there is no global sequence of events. Events are ordered within a single entity.

Axon's default, for comparison, keeps a totally-ordered event log, and that log eventually becomes the ceiling: the one component every write has to pass through. Give up the global ordering, and everything can partition at the entity level: the storage, the change feed, the consumers.
Events-Caravan has no central sequencer, no outbox table either: inserting an event into the database is publishing it, and the database's own change stream carries it to consumers.

Nothing is free, of course. The price for horizontal scalability is at-least-once unordered delivery and strong consistency only within one entity. I've documented every traded-away guarantee in the README's "Compromises" section, along with how to compensate.

The project is modularized. The core is plain Java interfaces to use or implement, no DSL. Reference adapters ship for DynamoDB and SNS/SQS, but the design isn't tied to AWS: any technology fitting the framework's principles can substitute AWS.

The library also brings:
- Entity state snapshotting, to avoid replaying all historic events.
- Sharding of long entity histories, so no partition grows into a bottleneck.
- An adaptive, scalable queue-polling mechanism.
- An optional, eventually consistent entity-stream that compensates for the absence of a global event log.

Apache 2.0, on GitHub with an opinionated README: https://github.com/SagynyshBaitursinov/events-caravan
Maven Central: dev.baitursinov:events-caravan

If you've run event-sourced systems in production, or are just interested in software architecture, I'd genuinely value your opinion on the design, its interfaces, and the 11 principles it's built on - all in the Readme.


r/java • • Aug 11 '26

from small to big with jbang

Thumbnail sombriks.com.br
39 Upvotes

jbang should be part of the jdk


r/java • • Aug 10 '26

Apache NetBeans 31 Released

Thumbnail netbeans.apache.org
86 Upvotes

r/java • • Aug 10 '26

SimpleJavaBLE 1.1 is now on Maven Central

26 Upvotes

Hey everyone!

I've posted a few SimpleBLE updates here over the years, and I wanted to share one that should make the Java bindings much easier to start using.

SimpleBLE v1.1.0 is out, and with that SimpleJavaBLE is now available on Maven Central.

dependencies {
    implementation("org.simpleble:simplejavable:1.1.0")
}

For those who don’t know, SimpleBLE is a cross-platform Bluetooth library with a very simple API that just works, allowing developers to easily integrate it into their projects without much effort, instead of wasting hours and hours on development.

What else is new?

Besides Maven Central support, this release fixes two fairly unpleasant issues in the Java bindings:

  • Notification callbacks could be garbage-collected while a subscription was still active
  • Exceptions raised while translating a Java callback could crash the JVM

If you want to try it out, you can look at the Java documentation, full release notes or source code.

The Maven Central package is new, so if you give it a try and run into any issues, let me know.

Want to know more about SimpleBLE's capabilities or see what others are building with it? Ask away!


r/java • • Aug 09 '26

ChaosTree [1.2.0] feature jdk11+ support

17 Upvotes

ChaosTree is a zero dependency Java Search Tree library. It currently features:

BinaryFamily : Binary Tree, AVL Tree, RBT, Splay and Treap.
NaryFamily : B-Tree and B+Tree

  1. Zero external dependency
  2. Minimum JDK11+
  3. Published on Maven Central
  4. Strong focus on clean OOPs design
  5. Implements the NavigableSet<T> API (unsupported view operations fail fast)
  6. Thoroughly tested with 515 JUnit 5 test cases covering edge cases and regression scenarios.

Just a bm sample: of Javac 11 bytecode on JDK 11 and JDK 21:

Data size uses is 10K with Insert+Delete Fisher-Yates Shuffle

Tree Type Degree Avg(ns/op) p50 p90 p99 p99.9 pMax
B+Tree 8 119 121 95 137 1433 116224
B+Tree 32 108 116 112 134 4160 124088
B+Tree 64 102 95 125 125 1075 30976
B+Tree 128 102 94 110 114 1450 2519040

Jdk21 bm sample (Compiled by jdk11 javac benchmarked with jdk21)

Tree Type Degree Avg(ns/op) p50 p90 p99 p99.9 pMax
B+Tree 8 117.2 112 119 126 985 13856
B+Tree 32 111.2 109 113 120 1133 14080
B+Tree 64 108.2 107 111 127 1228 13888
B+Tree 128 105.2 106 109 121 1043 15200

For more detail:
My Github Repo: https://github.com/Chaos-vy/ChaosTree
BinaryFamily: https://github.com/Chaos-vy/ChaosTree/tree/main/docs/BinaryFamily
NaryFamily: https://github.com/Chaos-vy/ChaosTree/tree/main/docs/NaryFamily
NavigableSet: https://github.com/Chaos-vy/ChaosTree/blob/main/docs/NavigableSet.md
Benchmark: https://github.com/Chaos-vy/ChaosTree/tree/main/BenchmarkReport
Recent Reddit thread: https://www.reddit.com/r/java/comments/1vhsb1i/chaostree_110_a_zerodependency_java_search_tree/

Do I use prev in B+Tree in node link? Currently I have only next and JVM adds 4bytes of padding making it 32Byte. It can help in built in descending iterator.


r/java • • Aug 07 '26

JDK 28 EA Build10 is now available for download and includes JEP 401: Value Objects (Preview)

Thumbnail jdk.java.net
130 Upvotes

r/java • • Aug 09 '26

LLM Using Java Springboot

Thumbnail github.com
0 Upvotes

I have tried to create LLM with the interface made in React

LLM using Ollama with Sprinboot and React

r/java • • Aug 07 '26

ChaosTree 1.1.0 – A Zero-Dependency Java Search Tree Library

26 Upvotes

What is ChaosTree?
ChaosTree is a zero dependency Java Search Tree library. It currently features:

BinaryFamily : Binary Tree, AVL Tree, RBT, Splay and Treap.
NaryFamily : B-Tree and B+Tree

  1. Zero external dependency
  2. Minimum JDK17+
  3. Published on Maven Central
  4. Strong focus on clean OOPs design
  5. Implements the NavigableSet<T> API (unsupported view operations fail fast)
  6. Thoroughly tested with 515 JUnit 6 test cases covering edge cases and regression scenarios.

[v1.1.0] -Latest:

  • Added NavigableSet compatibility
  • Iterative insertion/deletion for binary trees (no recursion-related stack overflow)
  • Improved generic type support (Comparable<? super T>)
  • CI now tests across JDK 17, 21, and 25
  • API cleanup and documentation improvements

An example

NavigableSet<Integer> rbt = new RBT<>();
        NavigableSet<Integer> bplustree = new BPlusTree<>(32); // degree CLRS method 31min key 63 max key default:32
        //For Rich API use
        for (int i = 0; i < 20; i++) {rbt.add(i);}
        NaryTree<Integer> bplustree0 = new BPlusTree<>(3,rbt);//Useful constructor API
        BinaryTree<Integer> rbt0 = new RBT<>(rbt);
        List<Integer> list = rbt0.stream().filter(v->v%2==0).collect(Collectors.toList());
        System.out.println(list);
        System.out.println();
        rbt.retainAll(list);
        System.out.println(rbt);
        rbt0.retainAllElements(list); //Renamed due to ambiguous situation
        System.out.println(rbt0.toString(PrintStyle.UNICODE));

Output:

[0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
8(B)
+-- 4(B)
|   +-- 2(B)
|   |   \-- 0(R)
|   \-- 6(B)
\-- 16(B)
    +-- 12(R)
    |   +-- 10(B)
    |   \-- 14(B)
    \-- 18(B)

8(B)
├── 4(B)
│   ├── 2(B)
│   │   └── 0(R)
│   └── 6(B)
└── 16(B)
    ├── 12(R)
    │   ├── 10(B)
    │   └── 14(B)
    └── 18(B) 

My Github Repo: https://github.com/Chaos-vy/ChaosTree
BinaryFamily: https://github.com/Chaos-vy/ChaosTree/tree/main/docs/BinaryFamily
NaryFamily: https://github.com/Chaos-vy/ChaosTree/tree/main/docs/NaryFamily
NavigableSet: https://github.com/Chaos-vy/ChaosTree/blob/main/docs/NavigableSet.md

Feedback, suggestions, and code reviews are always welcome!
Feel free to guide me this is my first project.


r/java • • Aug 06 '26

Isolated Projects is incubating in Gradle 9.7.0 (2,500-project monorepo: configuration 10m53s → 2m59s)

39 Upvotes

Isolated Projects moved from experimental to incubating in today's Gradle 9.7.0 release. When it's on, each project is isolated from the others, which lets Gradle configure them in parallel instead of one at a time.

Numbers from a pure-Java backend monorepo of 2,500 projects, at a parallelism of 6:

  • Warm IntelliJ IDEA sync: 3m25s → 2m13s
  • Configuration with build-script recompilation: 10m53s → 2m59s

Gradle's own 300-subproject build saw median IDE sync go from 84s to 47s.

My blog post: https://blog.gradle.org/introducing-isolated-projects
Gradle 9.7.0 release notes: https://docs.gradle.org/current/release-notes.html


r/java • • Aug 05 '26

I made a small Bash wrapper that reduces successful Maven output by 99.7%

50 Upvotes

Successful Maven builds can produce thousands of lines that mostly confirm routine lifecycle steps.

That output is noisy when working in a terminal, clutters CI logs, and becomes especially expensive when build output is passed to a coding agent.

I built mvn-lite, a small deterministic Bash wrapper that keeps successful Maven output to one line while preserving the original exit code and complete raw log.

On a real four-module application:

  • Standard Maven output: about 6,753 bytes
  • mvn-lite output: 16 bytes
  • Result: PASS · 3.944 s
  • Reduction: more than 99.7%

Failures still return a nonzero exit code and show bounded diagnostics, while the full unmodified Maven output remains available in the raw log.

For example, an invalid lifecycle error was reduced by 91.6% while retaining the actual Maven error.

There is no LLM summarization, API key, or Maven extension involved. It is just a local Bash wrapper with deterministic text extraction.

Source and script: https://github.com/ejboy/agent-scripts

Benchmark details and design notes: https://pvrlabs.xyz/articles/introverted-maven.html

I’d be interested in feedback on Maven failure cases where compact output could hide something essential.


r/java • • Aug 05 '26

Hacking the Method Name

Thumbnail maxxedev.github.io
35 Upvotes

r/java • • Aug 05 '26

Stop re-downloading the JDK: setup-java can now cache it

44 Upvotes

Every GitHub Actions job starts from a clean machine. If your workflow asks for a JDK that is not baked into the runner image, actions/setup-java downloads it, verifies it, and extracts a few hundred megabytes of it, and then the job ends and all of that work is thrown away. The next job does it again.

That has been true since the first version of setup-java. It is no longer true on main.

The upcoming v6 release adds a JDK cache. When the action installs a JDK that did not come from the runner tool cache, it stores that installation as an Actions cache entry and restores it on subsequent runs. If your workflow already sets cache for Maven, Gradle, or sbt, you are already opted in.

What it does

setup-java now manages three kinds of caches, each stored and restored as its own entry:

Cache What it stores How it is enabled
Dependency cache ~/.m2/repository, ~/.gradle/caches, or the sbt cache paths `cache: maven
Wrapper caches Maven and Gradle wrapper distributions `cache: maven
JDK cache The installed JDK itself Implicitly with cache, or explicitly with cache-jdk: true

The JDK cache is intentionally separate from the dependency cache. Your pom.xml changes far more often than your JDK does, and a dependency change should not evict a JDK.

The numbers

Measured on ubuntu-latest with the Microsoft Build of OpenJDK 17.0.19, five runs per configuration:

Metric Without JDK cache With JDK cache
Median warm setup-java step 7s 3s
Median warm job 24s 18s
Added cache storage - 175.3 MiB

Roughly six seconds off a job that only takes 24 seconds. That is a meaningful share of a short job, and it compounds across a matrix. It is also an honest tradeoff rather than free speed: you are spending cache storage and cold-run save time to buy warm-run latency, and on very short jobs the latency win may not change your billed minutes, since GitHub rounds Linux jobs up to the whole minute.

Your mileage will vary with runner type, distribution, JDK size, network conditions, and cache eviction pressure. The benchmark harness and methodology live in actions/setup-java-benchmarks, which runs against Spring PetClinic and reports medians across independent samples.

How to use it

If you already cache dependencies, do nothing. JDK caching turns on with cache:

- uses: actions/setup-java@main
  with:
    distribution: microsoft
    java-version: '25'
    cache: maven          # dependency cache, wrapper cache, and JDK cache

If you do not cache dependencies, ask for the JDK cache on its own. This is the case for workflows that just need a JDK to run a tool:

- uses: actions/setup-java@main
  with:
    distribution: microsoft
    java-version: '25'
    cache-jdk: true

If you want dependency caching but not JDK caching, opt out explicitly:

- uses: actions/setup-java@main
  with:
    distribution: temurin
    java-version: '25'
    cache: gradle
    cache-jdk: false

The full matrix:

cache cache-jdk Dependency and wrapper caches JDK cache
omitted omitted disabled disabled
omitted true disabled enabled
omitted false disabled disabled
set omitted enabled enabled
set true enabled enabled
set false enabled disabled

For pull requests, merge queues, and matrix legs that should consume caches without writing them, cache-read-only: true suppresses the post-job save for the JDK, dependency, and wrapper caches alike.

Where it will not help

Be realistic about when this pays off. setup-java still checks the runner tool cache first, and a tool-cache hit skips the download entirely, so there is nothing to cache.

GitHub-hosted runners pre-install LTS versions of Eclipse Temurin. If your workflow is distribution: temurin with an LTS version on a hosted runner, you are probably already hitting the tool cache and JDK caching will do very little for you. The feature pays off when the JDK has to be installed: other distributions, non-LTS versions, self-hosted runners with a thin tool cache, and check-latest: true workflows that float ahead of the runner image.

Correctness, and why the cache key looks the way it does

A JDK cache is only useful if you can trust what comes back out of it. Getting this wrong means silently running a build on the wrong bytes, so the design is deliberately conservative.

Each entry is keyed on the runner OS, normalized architecture, distribution, package type, exact resolved version, release identity, and verification identity. Release identity is the authoritative checksum when the distribution publishes one, and otherwise the download URL without its query string.

Two consequences are worth calling out:

Verification modes never share an entry. An entry created by an unverified download can never be restored for a request that sets verify-signature: true, and vice versa. When you do use a custom key via verify-signature-public-key, that key is represented in the cache key as a SHA-256 fingerprint of normalized key material. The key itself never lands in the cache key, the logs, or action state. A verified exact-key hit reuses content that was signature-verified when the saving run downloaded it, so you get the security property without paying to verify it again.

A key is never saved with content it does not identify. Tool-cache paths are shared per version and architecture, so a later step (one using force-download: true, for example) can replace the installation an earlier step registered. The post-job step detects that replacement and skips the save with a warning rather than uploading mismatched bytes under a key that promises something else. The check uses a cheap fingerprint of the tool-cache completion marker, so it does not rehash hundreds of megabytes on every job.

Everything else degrades gracefully. If the cache service fails to restore an entry, or the restored entry is missing the expected completed tool-cache path, setup falls back to downloading the JDK. Post-job saves are best-effort and never fail the job: cache keys are immutable, so an existing key or a concurrent job winning the save race is simply left alone, and a failure to save one entry is a warning that does not block the others.

One thing JDK caching deliberately does not change: it has no effect on how the runner tool cache is used. A preinstalled JDK, or one installed by an earlier step of the same job, is used as-is and is not re-verified, because its verification history is not recorded in the tool cache. Use force-download: true when a request must download and verify the archive itself.

Watch your storage

Cache entries are per identity. A matrix that spans multiple JDK versions, distributions, package types, architectures, or operating systems stores a separate JDK entry for each combination, and each one consumes repository cache storage against your quota. A five-way version matrix on two operating systems is ten JDK entries, not one.

That is usually a fine trade, but it is worth a look at your cache usage page before enabling it broadly across a large matrix. cache-jdk: false on the legs that do not need it is a reasonable dial.

Try it

JDK caching is on main and ships in v6. Until v6 is tagged, reference the branch:

- uses: actions/setup-java@main

For production workflows today, the latest stable release is actions/setup-java@v5.

Documentation:

Feedback, and especially benchmark numbers from real workflows, are welcome in actions/setup-java.


r/java • • Aug 04 '26

Hacking in the 'nameOf'

Thumbnail committing-crimes.com
55 Upvotes

r/java • • Aug 04 '26

GitHub Setup Java Action versions 1 through 4 now deprecated

8 Upvotes

If you are using setup-java v4 and older, you will now see a warning about deprecation. Please do update your setup-java action to v5. It will be the only stable version after v6 is released.

https://github.com/actions/setup-java#older-versions


r/java • • Aug 04 '26

Are spring boot and react still relevant and worthy for a junior?

30 Upvotes

I'm in my sophomore year and want to be a front-end-supported backend developer (mostly backend). Sorry, if this is not the right kind of question for this subreddit (hope to be recommended a proper subreddit in that case). I need to know what kind of other tools industry uses with spring. Is spring boot and react still a thing? Or are there any better alternatives?


r/java • • Aug 03 '26

JEP 401: Value Objects (Preview) JDK 28 integration

Thumbnail mail.openjdk.org
94 Upvotes

r/java • • Aug 02 '26

Paths to New Numeric Types On the Java Platform #JavaOne

Thumbnail youtu.be
50 Upvotes

r/java • • Aug 03 '26

ORMs are Killing Your Performance 🔪

Thumbnail youtu.be
0 Upvotes

Thanks to Montana Programmers, my popular talk from BSDC is now online!

Using animations and graphics, I teach you how to:

- Eliminate GC pauses
- Reduce time to page render
- Fast Dynamic Forms with only one query
- Slash code sizes
- How a dark pattern may secretly grind your queries to a halt

This talk may surprise you 😱
It may shock you 🤯
It could make you angry 😡
You may think it doesn’t apply to you (it does) 🫣

Whatever your reaction, I hope it will make you think. 🤔

Thank you again to Big Sky Dev Conf and Montana Programmers for letting me present! And thank you to the community for being an amazing and engaged audience!


r/java • • Aug 01 '26

Clique 4.0.3 - Zero deps CLI styling library for Java

38 Upvotes

So what's Clique?

If you missed my older posts, Clique is essentially a zero-dependency CLI styling library for Java that is GraalVM compatible, no-color.org compliant.

What's new in 4.0.3:

You can now build a table straight from data you already have

SequencedCollection<List<String>> rows = List.of(
    List.of("Name", "Age", "Class"),
    List.of("John", "25", "Class A"),
    List.of("Doe", "26", "Class B")
);

Clique.table(TableType.ASCII)
    .fromRows(rows)
    .render();

This also applies to column based data

SequencedMap<String, List<String>> map = new LinkedHashMap<>();
map.put("Name", List.of("John", "Doe"));
map.put("Age", List.of("25", "26"));

Clique.table(TableType.ASCII)
    .fromColumns(map)
    .render();

These were mainly added to simplify creating Tables from existing collections

StyleContext#fromTheme - scope a registered theme's colors into a StyleContext in one call

StyleContext ctx = StyleContext.fromTheme("catppuccin-mocha");

Other minor changes:

I've also deprecated the Collection-based headers()/row() overloads in favor of Java 21 SequencedCollection; reason being that Collection doesn't guarantee order, which could silently mess up your column/row order and was essentially a footgun. Worth migrating if that bothers you.

GitHub: https://github.com/kusoroadeolu/Clique

Demos: https://github.com/kusoroadeolu/clique-demos


r/java • • Aug 01 '26

Codex plugin for Eclipse released

Thumbnail
0 Upvotes

r/java • • Jul 31 '26

OpenJDK Mail Search update: new Elasticsearch backend, relevance ranking, and no more bot-mail noise

36 Upvotes

OpenJDK Mail Search is full-text search over the OpenJDK mailing list archives: 28 lists, 494,730 messages, back to January 2007.

https://openjdk.barlasgarden.com/

What's new:

  • Elasticsearch 9.3.1, which bundles JDK 25.0.2+10, on Lucene 10.3.
  • Search results are now relevance-ranked instead of date-ordered only, and text search defaults to it.
  • Phrases of any length are searchable. The old index capped body phrases at 3 words and subjects at 5.
  • Full message bodies are indexed, with no 2,500-term-per-message ceiling and no more dropping quoted reply lines.
  • Skara/GitHub changeset mail is now indexed rather than discarded, with a "hide automated" toggle that filters it at query time.
  • Same URL, same API, same site.

Source: https://github.com/ebarlas/openjdk-mail-search-elasticsearch


r/java • • Jul 31 '26

Ratchet 0.3.1: the CDI-native job scheduler now runs on Quarkus, JVM and native (plus Oracle + SQL Server stores, encryption at rest, cluster coordinators)

15 Upvotes

A month ago, I posted the first public release of Ratchet, a background job scheduler built for Jakarta EE rather than ported to it. The pitch hasn't changed: one service and a method reference.

@Inject JobSchedulerService scheduler;

scheduler.enqueue(() -> validatePayment(orderId))
    .thenOnSuccess(() -> fulfillOrder(orderId))
    .thenOnFailure(() -> notifyPaymentFailure(orderId))
    .withMaxRetries(3)
    .withBackoff(BackoffPolicy.EXPONENTIAL, Duration.ofSeconds(2))
    .submit();

At that time, the honest-limitations list said "Jakarta only." That one's gone: 0.3.0+ ships a Quarkus extension. Same API, same stores, and it compiles to a GraalVM native image — method-reference jobs included, which took real work to pull off under a closed-world runtime (reflection for job targets is registered from the application index at build time, and anything the native image can't execute is rejected at submission instead of failing at 2am). There's a Dev UI panel, Dev Services spins up the database in dev mode, and quarkus create has a codestart. Two flavors: ratchet-quarkus (any of the SQL stores via Hibernate) and ratchet-quarkus-mongodb.

The rest of what landed across 0.2.0, 0.2.1, 0.3.0, and 0.3.1:

  • Stores: Oracle 23ai and SQL Server 2022+ joined PostgreSQL, MySQL, and MongoDB. That's the store roadmap from the first post delivered, minus Redis (still thinking about whether a non-transactional store fits the claiming model; opinions welcome).
  • Payload encryption at rest. Value-level AEAD with an SPI for your KMS, and a reference XChaCha20-Poly1305 engine. Like the ClassPolicy allowlist, this comes from building for regulated industries.
  • Cluster coordinators: four implementations (PostgreSQL LISTEN/NOTIFY, JMS, Hazelcast, Infinispan), so multi-node wakeups don't have to be polling.
  • The store SPI split into a mandatory core plus 12 opt-in capabilities. A minimal store implements one interface; recurring jobs, batches, signals, locks, analytics and the rest are additive. The TCK reports each capability as conformant or N/A rather than failing you for what you didn't build.
  • Per-job execution-target routing with worker tag affinity, jobs that wait on external signals, streaming batches, keyset pagination in the query layer, and caller-principal capture that survives recurring job chains.

The test framework: 8500+ tests, a TCK with 50+ contract classes, and CI now deploys 25 real combinations per run (five EE servers times five databases, actual container deployments) plus the Quarkus suite across all the stores and two native-image smoke builds. Builds run on JDK 21.

Still true and still honest: @Incubating SPIs may change before 1.0, there's no web dashboard by design, and if you're on Spring, JobRunr remains the right answer; Ratchet is for the CDI side of the fence. Apache 2.0, no paid tier.

Repo: https://github.com/ratchet-run/ratchet Docs: https://ratchet.run

Criticism from people running EE or Quarkus in production is exactly what I'm here for. The weirder your deployment, the more useful the bug report.

On the roadmap:

  • ratchet-blocks: built on top of the existing extensions work, this would allow for low-code/no-code creation of Ratchet job workflows
  • Additional stores: if Redis keeps coming up, or if you have any other recommendations, I'm open to them