What's New in V3

Versions 3.0.1 is based on 2.8.0 (released in January 2025), but bumps the Java version to 21!

We asked our users which minimal Java version we should use, but there was no one clear answer, as expected ;-)

The current/latest Long Term Support (LTS) version of Java is version 21. So it makes sense to jump forward from 11 to 21. This will also prepare us for the next LTS, which will be Java 25 in September 2025. Bumping to the latest LTS makes it possible to make use of many newer Java language and runtime improvements, simplify parts of the code, etc.

We would like to move to Java 22 as this would allow us to easier call C code to interact with the GPIOs, thanks to JEP 454: Foreign Function & Memory API. Unfortunately, 22, is not a LTS, so it would force us to bump the version every six months with each new release, up till 25.

What’s New in V3?

The first V3-release of Pi4J, version 3.0.1, is a continuation of 2.8.0, but bumps the minimal Java version to 21 and includes some improvements, see the release notes.

Sources

The Pi4J V3 source code is available in this GitHub repository: pi4j/pi4j GitHub Repository

git clone https://github.com/Pi4J/pi4j