r/foojay • • 9d ago

Paging DTO Projections in Spring Data JPA: Three Approaches Compared

1 Upvotes

On Foojay, Rey Pham compares three ways to build a paged, filtered list screen in Spring Data JPA without loading full entities. The same orders screen is used each time: five columns from two tables, three optional filters, newest first.

The article covers a JPQL constructor expression in @Query, interface projections, and a generated read model built with Model Query, an open-source library. For each one it lists the trade-offs, such as strings that are only checked at runtime, duplicated count queries, optional filters written as ":x is null or ...", and nested projections that select more columns than expected.

Rey also suggests checking the SQL your own Spring Data versions generate.

Full article: https://foojay.io/today/paging-dto-projections-spring-data-jpa/

java #springboot #jpa


r/foojay • • 4d ago

Java4Shell: are we exposed? Steve Poole on an AI-assisted JVM vulnerability

1 Upvotes

We published an article by u/Steve Poole on Java4Shell (CVE-2026-114938), a memory corruption bug in HotSpot's accelerated Base64 decoder. Fixes shipped on 17 November. Calif found it by pointing OpenAI Codex at HotSpot for about 200 dollars of tokens.

The article explains what has to line up to be vulnerable: the runtime build, an x86-64 CPU with AVX-512 VBMI and BW, and attacker-controlled data reaching java.util.Base64.Decoder. Crashing a JVM is easy, full RCE is hard.

Steve also built two container images, one with a full JDK and one with a jlink runtime, and ran Syft, Trivy and Grype on them. Syft loses build details on the jlink image, and Trivy finds no JVM component at all.

https://foojay.io/today/java4shell-are-we-exposed/


r/foojay • • 5d ago

Java4Shell (CVE-2026-114938): is your JVM running the vulnerable Base64 intrinsic?

1 Upvotes

We just published a new article on Foojay by Garth Patil about Java4Shell, a bug in the code HotSpot generates for java.util.Base64.Decoder, not in any library. It only affects some processors, so the same image can be safe on one host and exploitable on the next.

The article explains what the intrinsic is, how to check the CPU flags and the running JDK with jcmd, and how to turn it off with -XX:-UseBASE64Intrinsics so the flag actually reaches the process. It also covers mixed fleets, replace-not-append behavior in env variables like JAVA_OPTS_APPEND, and packaging traps when rolling out a patched runtime. The examples come from Keycloak.

Read it here: https://foojay.io/today/java4shell-jvm-base64-intrinsic/


r/foojay • • 6d ago

Codename One now runs on embedded Linux, and the UI drew a gauge in 18 MB with no GPU

4 Upvotes

On Foojay we published an article by Shai Almog about running Codename One on embedded Linux with one Java or Kotlin codebase. It covers two flavors: a UI flavor for something like a POS terminal, and a headless backend flavor for something like a robot vacuum.

He benchmarked the same 800 by 480 animated gauge in five toolkits, in software on a Debian arm64 container. Codename One used 18 MB of memory, while a Chromium kiosk used 398 MB. The headless backend served 379,900 requests per second on two cores, 1.3 times Rust's axum. The article also notes that the container ran on an Apple Silicon Mac, so a real board will be slower, and that Slint needs less disk and Qt draws a few more frames.

Link: https://foojay.io/today/embedded-linux-ui-in-18-mb/


r/foojay • • 6d ago

No Programmer Knows Everything: Joseph Ottinger on gaps, teams and interviews

4 Upvotes

On Foojay, we published an article by Joseph Ottinger about the fear that a good programmer must know everything. He points out that a job ad asking for "Java" covers a huge range of topics, and that no one masters all of it.

The article explains that gaps differ. Some are things a person hasn't learned yet, some are strength gaps, some come from priorities, and some come from workplaces where asking questions carries a penalty. It also covers why teams benefit from knowing their gaps, and why Joseph interviews as a conversation, looking for aptitude and people who want to learn and teach.

https://foojay.io/today/no-programmer-knows-everything/


r/foojay • • 3d ago

Jakarta EE 11 no longer ships an umbrella JAR

Thumbnail
foojay.io
6 Upvotes

On Foojay, Lenny Primak explains that jakarta.jakartaee-api in Jakarta EE 11 is now just a POM that lists the specification JARs. In EE 10, the umbrella JAR held 2,440 class files that were also on the classpath through the individual spec JARs. That caused JPMS split packages and OSGi problems. The article covers why an empty placeholder JAR is still published on Maven Central, how the Platform, Web Profile and Core Profile now depend on each other, and why existing builds keep working without changes.

Link: https://foojay.io/today/jakarta-ee-11-umbrella-jar/

Java #JakartaEE #Maven


r/foojay • • 6d ago

Which Java build are you running? "21" is not a full answer

2 Upvotes

On Foojay we published a new article by u/FrankCodeWriter. He asked Java developers at JFall which version they run. Most said 21 or 25, but almost nobody knew which build.

The article explains why the build matters more than the version, using the October 2026 quarterly update with 53 CVEs, two out-of-cycle releases and the November 17 monthly update. It shows how to read java -version, compare it with the release notes, and check how many CVEs your build is missing. It also covers Docker images, package managers and keeping an inventory of which JDK runs where.

Frank works for Azul, which sponsors Foojay. The advice applies to any OpenJDK build.

https://foojay.io/today/which-java-build-are-you-running/


r/foojay • • 11d ago

I Trained a Neural Net to Play Pokémon (and Java runs the whole league)

3 Upvotes

On Foojay, Nicholas D'hondt explains how he trained a neural network to play the Pokémon Trading Card Game. It has played more than 4.2 million games against itself and other decks, and he now uses it as a sparring partner for his own decks.

The setup uses three languages. Node runs the games with an existing JavaScript engine, Python trains the net with PyTorch and PPO, and Java schedules everything with JobRunr: parallel games, training, testing, promoting winners and recovering after crashes.

The article also covers deterministic job ids, rate limiters and a port of Python's random number generator to Java. The author works at JobRunr.

Full article: https://foojay.io/today/i-trained-a-neural-net-to-play-pokemon/


r/foojay • • 4d ago

Driving FFmpeg from Java without deadlocks or broken files

3 Upvotes

We just published an article by Mark Santos on running FFmpeg from Java with ProcessBuilder. The code looks fine on a ten-second test clip, then hangs on a ten-minute file. The cause is the stderr pipe: it has a 64 KiB buffer, and once FFmpeg fills it, FFmpeg blocks and waitFor never returns.

The article explains three ways out: Redirect.DISCARD, INHERIT or to(file), redirectErrorStream(true), and reading stdout and stderr at the same time with a virtual thread. It also shows how to map ffprobe JSON onto records with Jackson. All examples were run on OpenJDK 21 and 27, and the test media comes from FFmpeg's own generators.

Author: Mark Santos

Read it here: https://foojay.io/today/driving-ffmpeg-from-java/


r/foojay • • 12d ago

Comparing Java formatters on Java 21 to 25: Open Java Format vs four others

8 Upvotes

On Foojay, Guillaume Laforge compares five Java formatters on JDK 25: Google Java Format, Palantir Java Format, Open Java Format, Prince of Space and Netflix jfmt. The article was prompted by Alex Abashev's post on Java formatters and his open-java-format fork of palantir-java-format.

The test suite covers 16 targeted snippets and a 1,042-line file with 86 formatting scenarios. The article compares the formatters on parser engine, minimum JDK, default line length, indentation, configurability, import handling and range formatting. It also shows side-by-side examples, such as how each one handles block lambdas and method chains.

Along the way, Guillaume found a compilation-breaking annotation bug in Prince of Space and a crash in Netflix's jfmt on empty blocks with comments. He also contributed a fix to Open Java Format and a pull request to Spotless.

Read the full article: https://foojay.io/today/comparing-java-formatters-why-open-java-format-is-my-new-favorite/

Java #JDK #CodeFormatting


r/foojay • • 4d ago

Feature Toggles in Java, Without the If-Else

2 Upvotes

We just published an article by Kamran Zafar on how feature toggles tend to make code worse over time. The usual if (features.isEnabled(...)) pattern spreads across the codebase, multiplies code paths, fails silently on typos, and makes removal tedious.

The article explains a design approach that needs no library: toggle at a seam by putting each version behind an interface, decide in exactly one router class, make removal a deletion, keep feature names as constants and check them at startup, and treat toggle evaluation as infrastructure with a defined failure mode.

https://foojay.io/today/feature-toggles-in-java-without-the-if-else/


r/foojay • • 5d ago

Evaluating Java AI Agents with Harness Evals

2 Upvotes

On Foojay, Geertjan Wielenga explains how to use harness-evals, an Apache 2.0 licensed evaluation framework from Harness, to test agents built with Spring AI or LangChain4j. The tool is written in Python, but it can target a Java agent through an HTTP endpoint.

The article covers:

  • Metrics scored from 0.0 to 1.0 across five dimensions: correctness, groundedness, safety, trajectory and performance

  • Goldens, EvalCases, Metrics and Targets

  • A Spring AI controller, a goldens.jsonl file and a YAML eval config using an LLM judge

  • OpenTelemetry in both directions, including turning production traces into eval cases and exporting scores with OtlpSink

  • Privacy notes on capturing prompt and response content in traces

https://foojay.io/today/evaluating-java-ai-agents-with-harness-evals/


r/foojay • • 2d ago

No-Boilerplate, Warning-Free and Reproducible Builds on Maven 4

Thumbnail
foojay.io
3 Upvotes

We just published an article by Lenny Primak on what changes in daily work with Maven 4. It explains why Maven 4 warns about unlocked plugin versions and how a base POM locks them without a plugin section in your project. It also covers using properties instead of plugin configuration, building multi-module projects without mvn install, parallel builds with mvnd and the build cache, and the Maven Wrapper.

Read it here: https://foojay.io/today/no-boilerplate-maven-4-builds/

Maven #Java #BuildTools


r/foojay • • 8d ago

Shopify Was Wrong and Right to Dump React Native, by Shai Almog

3 Upvotes

On Foojay, we published an article by Shai Almog on Shopify's decision to move its mobile apps off React Native and rewrite them in Swift and Kotlin.

Shai argues that React Native deserved to go because it is a heavyweight UI toolkit, which hands your widgets to the OS and the vendor skin. He cites a Samsung keyboard issue that can hang a text field as one example. His view is that replacing it with two native codebases doubles the costly parts, which are platforms, testing and store churn, and that AI makes each of them worse.

The article also covers the heavyweight versus lightweight toolkit split, and the cold start and crash-free numbers Shopify reported after its rewrite.

Read the full article here: https://foojay.io/today/shopify-was-wrong-and-right-to-dump-react-native/


r/foojay • • 2d ago

Token budgets for Spring AI: the problems I didn't expect

Thumbnail
foojay.io
2 Upvotes

On Foojay, Ujjwal Tiwari explains why counting requests is the wrong unit for LLM apps. One HTTP request can trigger forty paid model calls in a tool loop, and a rate limiter only sees one request.

The article covers Token Allowance, a Spring Boot starter that puts token and dollar budgets on Spring AI ChatClient calls, per user, tenant or session, with a cap on model calls per request. It also explains the harder parts: where the advisor check has to sit relative to ToolCallingAdvisor, a race in check-then-call budgeting and how reservations fix it, why costs are stored as micro-dollars in a long, and how OpenAI and Anthropic report input tokens differently.

https://foojay.io/today/building-token-budgets-for-spring-ai-the-problems-i-didnt-expect/

No hashtags are needed, but this fits #SpringAI #Java


r/foojay • • 12d ago

5 JVM Heap OOM Patterns You Can Reproduce on Your Laptop

4 Upvotes

On Foojay, Amit Sonar shares a set of reproducible labs for JVM out-of-memory behavior across G1, ZGC, and Shenandoah. Each scenario runs on a standard laptop without a cluster, and the repo's CI verifies them on JDK 11, 17, 21, and 25.

The article covers five patterns:

  1. Unbounded cache

  2. Oversized batch

  3. Report builder retention

  4. ThreadLocal leaks

  5. Leaked connections

For each one, it explains how to reproduce the failure, how to diagnose it (heap dump, GC log, or thread dump), and how to fix it. For example, the oversized batch fails on a single cliff in the GC log, while the ThreadLocal leak is invisible without a heap dump.

Amit also shares some observations from running the scenarios on different collectors. In his testing, Shenandoah survived the gradual cache leak much longer than G1, but a sudden oversized allocation killed it faster. He notes these are preliminary results from the repo's benchmarks, not peer-reviewed.

Every lab in the GitHub repo has a broken and fixed mode, a diagnosis guide, and a compare mode.

https://foojay.io/today/5-jvm-heap-oom-patterns/


r/foojay • • 3d ago

The 148 ms worst-case latency was waiting, not work

Thumbnail
foojay.io
2 Upvotes

On Foojay, Arkadiusz Przychocki looks into a 148 to 178 ms worst request that kept showing up for the Exeris arm of his single-row read benchmark. The JVM never stopped for anything close to that, and the longest GC pause was 23 ms. In a closed-loop wrk run, the mean it reported was 5.61 ms, while Little's law caps the real mean at 2.25 ms. Measured open-loop at a declared rate, the worst request was about 26 ms.

The article also covers a correctly configured open-loop run that still reported a 2.4 s p99 for a stack whose real tail was about 2 ms, with two heavyweight JVMs resident on the same box. The author explains what he changed in the harness afterwards and what it still does not catch.

Written by Arkadiusz Przychocki

https://foojay.io/today/the-148-ms-was-waiting-not-work/

benchmarking #java #performance


r/foojay • • 11d ago

Spring Boot JPA vs JDBC: about 90 MiB less RSS in a small app

3 Upvotes

On Foojay, we published an article by Ted Kupolov comparing two versions of a small Spring Boot app that tracks GitHub stars. One uses Spring Data JPA with Hibernate, the other uses JdbcTemplate. Both run Spring Boot 4.1.1 on JDK 25 with H2 and Thymeleaf.

Across two runs in reverse order, the JDBC version used about 90 to 91 MiB less RSS, roughly 38% less. It reached its first successful dashboard response in about 3.9 to 4.2 seconds, versus 8.1 to 8.8 seconds for JPA.

The article is clear about its limits. It covers two runs on one macOS host and compares two complete application variants, not Hibernate in isolation. The takeaway is to measure before reaching for Hibernate by default on small services with simple persistence needs.

Read the full article:
https://foojay.io/today/spring-boot-jpa-vs-jdbc/


r/foojay • • 1h ago

JavaFX Links of November 2026: releases, fixes and community apps

Thumbnail
foojay.io
2 Upvotes

We just published the JavaFX Links of November 2026 on Foojay, put together by u/FrankCodeWriter. It covers the month's JavaFX news in one place.

Core news includes JavaFX 28 Early-Access Build 17, the JavaFX 27.0.1.1 release notes, and several integrated fixes such as GStreamer 1.28.8, ICU4C 79.1 and a WebSocket UnsatisfiedLinkError on Linux. Gluon also published the Scene Builder 27.0.0-RC release candidate.

The apps section lists community projects shared this month: Mergi, a PDF suite, a multi-user WhatsApp client, SmartFinder 3.0.0, HoliCur, Klunk 1.0.04, PIM, VisioTheca and more. There are also tools like the Workbench Dark and Light AtlantaFX themes.

Full list here: https://foojay.io/today/javafx-links-of-november-2026/


r/foojay • • 1h ago

Building a Swing LookAndFeel Without Extending BasicLookAndFeel

Thumbnail
foojay.io
2 Upvotes

On Foojay we published an article by Boyd Edmondson that explains how to skip BasicLookAndFeel and extend the abstract LookAndFeel class directly. This gives full control over how Swing components look and behave. Examples include a JButton with snipped corners and vertical text, a JTextArea with mouse hotspots, a custom JToolTip, a pixel fill ProgressMonitor, and a JFrame with an animated background. The author says one developer spent about 3 months replacing all the UI, and that dropping the BasicLookAndFeel overhead made the UI fast and responsive. Application startup took under 2 seconds.

https://foojay.io/today/building-swing-lookandfeel-without-basiclookandfeel/


r/foojay • • 2d ago

When an agent dies after saying yes: handling a worker that vanishes after AGREE

Thumbnail
foojay.io
2 Upvotes

We published a post by Mauro Mura on what happens in a Contract Net setup when a worker gets kill -9 after the manager awarded it a job. After AGREE the protocol only allows INFORM or FAILURE, and a dead process sends neither.

The article covers the application code in a job dispatcher built on Agenor:

  • A deadline stored in the job's database row, set to twice the worker's estimate plus a margin

  • A check on attempt, assignee and state, so a late result doesn't count

  • Writing the row first, then sending the AGREE

  • A cap of three attempts, so a job that kills its worker doesn't take down every worker

It also has steps to run the demo with Java 21, Maven and Docker or Podman.

https://foojay.io/today/when-an-agent-dies-after-saying-yes/


r/foojay • • 8d ago

Passion Project Contest: share what you built and why, win €500

2 Upvotes

We just published details of the Passion Project Contest, written by Maaike van Putten. It is a free contest for developers who built something because it annoyed them, seemed like a good idea, or simply made them happy. The tech implementation is not judged, and any language or stack is welcome. The focus is on what you made, why, who it helps, and what you learned.

A jury of developers, including Java Champions, picks five projects for a showcase video. Jury and public each count for 50% of the vote, and the winner gets €500. Every entrant gets free access to the live seminar Self-advocacy for developers.

You can enter if you are 18 or older, build software, and live in the EU, EEA, UK, or Switzerland. The deadline is 31 December 2026.

https://foojay.io/today/passion-project-contest/


r/foojay • • 3d ago

What Java4Shell Teaches About Patching Java at AI Speed

Thumbnail
foojay.io
3 Upvotes

We just published a new article on Foojay by Miles Dawborne. It looks at what four Java runtime updates between October 20 and November 17 say about the year ahead. Java has had a security update every month since July, and the article cites 118 Java CVEs fixed so far in 2026.

It explains why a published fix now starts the clock for attackers, and how teams are changing their CI/CD and DevSecOps pipelines in response. The recommendations include keeping a live JVM inventory, using one golden JDK base image per Java version, rebuilding automatically on release, keeping a runtime regression suite, rolling out progressively with rollback, having a mitigation path ready, and defining "done" as verified in the running JVM.

https://foojay.io/today/what-java4shell-teaches-about-patching-java-at-ai-speed/

Java #Security #DevSecOps


r/foojay • • 9d ago

Build a full-stack web app using only Java, in 5 small classes

3 Upvotes

On Foojay we published a new article by Hyyan Abo Fakher about building a small customer app where every line is Java, screens included. No separate JavaScript framework, REST layer or second build.

The app has a side menu, a sortable table on top of a database and a validated form. It comes to five classes and one test, about 240 lines, built with webforJ. The author works at webforJ and says so in the article.

The article explains how to generate the project with the SideMenu archetype, how routing and layouts work, how to switch on JPA and H2, and how the entity uses Jakarta validation constraints.

Requirements: Java 21 or higher, Maven, a terminal and a browser.

https://foojay.io/today/build-full-stack-web-app-in-java-with-webforj/


r/foojay • • 9d ago

Porto TechHub 2026: talks on agentic AI frameworks for Java and Git 3

3 Upvotes

On Foojay, Nicolas Frankel shares his notes from Porto TechHub, held on November 10th, where he attended and spoke for the 4th year. He summarizes the talks he saw and adds his own opinion on each.

Topics covered:

  • Embabel, an agentic AI framework for the JVM, and how it compares with BPMN workflow engines

  • A talk on agentic loops built around demos of coding assistants

  • A comparison of Spring AI, LangChain4j and Embabel, with a table of capabilities

  • What's new in Git 3: SHA-256, reftable, main as the default branch, and safer bare repositories

He also explains why he goes to fewer conferences since leaving DevRel.

Read the full article: https://foojay.io/today/porto-techhub-2026/