
Conference50min
The Wait is Over: Foreign Function & Memory (FFM) API brings modern Java to the Raspberry Pi
This talk shows how Pi4J’s migration to Java 25 and the new FFM API streamlines hardware control on Raspberry Pi, reducing complexity and improving performance. Live demos illustrate controlling components with Java, making hardware interaction easier for Java developers interested in IoT and embedded systems, with minimal dependencies.

Frank DelporteAzul
talkDetail.whenAndWhere
Thursday, October 9, 10:40-11:30
Room 7
talks.roomOccupancytalks.noOccupancyInfo
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 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, it’s time to bump the Pi4J project to Java 25 and make 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: fewer dependencies, a smaller JAR footprint, support for more protocols, and compatibility with more SoCs, among other benefits.
Through live demos, you will learn how to control LEDs, read buttons, interface with LCD displays, and gather sensor data using JBang single-file example applications. 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.
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, it’s time to bump the Pi4J project to Java 25 and make 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: fewer dependencies, a smaller JAR footprint, support for more protocols, and compatibility with more SoCs, among other benefits.
Through live demos, you will learn how to control LEDs, read buttons, interface with LCD displays, and gather sensor data using JBang single-file example applications. 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
Frank Delporte is a Java Champion, developer, and technical writer working at Azul, blogs on his own site and Foojay, author of "Getting Started with Java on the Raspberry Pi", co-organizer of BeJUG, and contributor to Pi4J and JFX Central. He blogs and talks about his experiments with Java and JavaFX, sometimes combined with electronic components, on the Raspberry Pi.
talkDetail.shareFeedback
talkDetail.signInRequired
talkDetail.signInToFeedbackDescription
occupancy.title
talkDetail.signInRequired
occupancy.signInToVoteDescription
comments.speakerNotEnabledComments