JBang makes it possible to run Java as a scripting language — no project setup, no build tool, just a single .java file you can execute directly. These posts use JBang for quick Java experiments, Raspberry Pi demos, benchmark runners, and examples that would otherwise need a full Maven or Gradle project. A great tool for Java developers who want to prototype fast.
The Pi4J project is a Java library that allows you to control the GPIO pins and electronic components connected to a Raspberry Pi with pure Java code. It removes the complexity of using native libraries and the Java Native Interface (JNI), allowing you to focus on your application logic.
FXGL is a framework to easily create JavaFX-based game applications. In this blog post, I want to show you how this can be done within a single Java-file which doesn’t need a full Maven or Gradle project but can be executed directly with JBang without compilation. This approach can be used as an easy way to get new Java(FX) developers started or create your first experiments with FXGL.
One of the most “fancy” electronic components is definitely a LED strip. It’s really cool to control a long strip of lights with only a few lines of code… But, there is a problem. The timing of the signals is crucial to reliably control these strips. Both Python and Java on a Raspberry Pi can struggle with these timings as they are running on Linux, a non-real-time operating system. So, for instance, pauses in the garbage collection of the Java virtual machine, or any glitch in the operating system can cause unexpected effects on the LED strips. That’s why in most projects, a microcontroller (Arduino, Raspberry Pi Pico, ESP32,…) is used to drive the LED strip.
In my search for a good solution to use LED strips with Java, I stumbled on the Pixelblaze Output Expander. This small device is controlled through a serial interface, and handles the control of the LED strip. As it turns out, this is a perfect solution to offload the timing-critical operations from the Raspberry Pi and have reliable output on a LED strip.
On Foojay.io, Bazlur Rahman is publishing a series of interviews with various people from the OpenJDK community. I had the honor to be included in this series, and this is a repost.
February is a short month, but this list seems to be longer than ever… A lot of game development, releases, interesting ongoing development, and so much more to read. Enjoy reading and clicking!