Session

The Wait is Over: LTS Java 25 brings FFM to #JavaOnRaspberryPi

Since 2012, Pi4J has enabled Java to control electronic components connected to the Raspberry Pi's GPIO pins. However, both Java and the Raspberry Pi have evolved significantly since then. Supporting new hardware has been a challenge, requiring multiple implementations in the Pi4J library with a significant amount of complex code based on the Java Native Interface (JNI) and Java Native Access (JNA).

The Foreign Function & Memory (FFM) API, finalized in Java 22, promised to make such integrations with native code a lot easier. With Java reaching a new Long Term Support version, the Pi4J project bumped to Java 25 and makes full use of FFM!

In this talk, you’ll learn how this FFM implementation is much easier to support and achieves high performance due to less memory copying and less interop code. It will also help improve the Pi4J project by reducing dependencies, minimizing the JAR footprint, supporting additional protocols, and enhancing compatibility with more SoCs.

Through live demos, you will learn how to control LEDs, read buttons, interface with LCD displays, and gather sensor data. You'll see how FFM makes hardware interaction as natural as regular Java programming, and you will be ready to start your own experiments as soon as you arrive home.

Target audience: Java developers interested in IoT, embedded systems, and hardware programming. Basic Java knowledge is required, but no prior experience with Pi4J or electronics is needed.

Frank Delporte

Java Champion - Author of 'Getting started with Java on the Raspberry Pi' - Senior Technical Writer at Azul

Zonnebeke, Belgium

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top