r/foojay • • 11h ago

An Introduction to JSR 381, the Java Visual Recognition API

4 Upvotes

We just published an article by Geertjan Wielenga on JSR 381, the Visual Recognition API (VisRec). It is the Java Community Process standard for image classification and related machine-learning tasks in Java, and it reached Final status in February 2022.

The article explains what the API standardizes. Your code calls the javax.visrec interfaces, such as ImageClassifier, and the library that does the recognition is an implementation found on the classpath at runtime. It also shows how to use the official reference implementation built on Deep Netts, and then writes a new implementation backed by DuckDB to show how small the contract is.

Link: https://foojay.io/today/jsr-381-java-visual-recognition-api/


r/foojay • • 11h ago

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

2 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 • • 44m ago

Java4Shell (CVE-2026-114938): what it is, who is affected, and what to do

1 Upvotes

Just published on Foojay: an article by Pavel Petroshenko on Java4Shell, a memory-corruption flaw in the hardware-accelerated Base64 decoder in OpenJDK's HotSpot VM. It affects x86-64 systems with AVX-512 enabled, and Calif showed it can lead to remote code execution.

The article explains who is affected, how the CVSS 3.1 and 4.0 ratings relate, why it is not a zero-day, and what to do now. If you run another Java distribution, check with your vendor.

https://foojay.io/today/java4shell-cve-2026-114938-what-it-is-who-is-affected-and-what-to-do-now/


r/foojay • • 11h ago

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

1 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/