2025-02-11 by Frank Delporte
The development of the Pi4J library faced a decision point…: “Should we stick to Java 11 for existing projects and old Raspberry Pi’s (with ARMv6), versus moving on and making use of better and more performant Java code with the latest Long Term Support (LTS) version?”
We actually wanted to move on to Java 22, as it brings a new way of interacting with C-code, thanks to JEP 454: Foreign Function & Memory API. As this is the core behavior of Pi4J to interact with the GPIOs, it would make it much easier to implement new ways to control electronics, as confirmed with a first test by Robert “Eitch”. But as Java 22 is not an LTS release, we won’t make this move yet.
We asked our users which minimal Java version we should use, but there was no one clear answer, as expected ;-) So with the core team we made a few decisions that are allowing us to bring the project to “the next level” and… Java 21!.
pi4j-v2
to pi4j
as it holds the sources of all V2 and future V3, V4,… versions.3.0.0-SNAPSHOT of Pi4J is already available for testing from the Maven Repository if you enable snapshots in your pom-file. See Pi4J Downloads > Snapshot Archives for more info.
More info about V3 will be documented on the page What’s New in V3.