Tutorial 22
Step-by-step Java tutorials from real experiments — covering JavaFX UI development, Raspberry Pi hardware interaction with Pi4J, Java tooling, JVM configuration, and getting started guides for new and experienced developers alike. All examples are practical, tested, and built around things that actually needed solving.
Defining the Text in a JavaFX ComboBox with Objects
Do you know the problem that you have done a specific task already many times in the past, but it’s too long ago to remember exactly how you did it the previous times? One of …
Template project to build a JavaFX application as a JAR with dependencies with Maven
Recently, I was asked what the best way is to build a Fat JAR (a JAR with all dependencies) using Maven. Therefore, I created a GitHub project javafx-jar-template that you can use …
Deep dive into bits, bytes, shorts, ints, longs, signed, and unsigned with Java
On the Pi4J discussion list, someone recently asked what the best and easiest way is in Java to convert a byte value . In Java, there is no distinction between signed and unsigned …
JavaFX with Kotlin versus Java
Recently I have been experimenting with the combination of JavaFX and Kotlin. As Kotlin also runs on the Java Virtual Machine (JVM) and is a very close sister of Java, the switch …
Example Java Application with Embedded Jetty and a htmx Website
I was experimenting with a Java application that can act as a web server and includes the user interface HTML-files that get modified with htmx, to replace certain parts of the …
Search in Documentation with a JavaFX ChatGPT-like LangChain4j Application
At the Fosdem conference in Brussels on February 3rd, I gave a presentation about using an existing documentation set as the data for a ChatGPT-like application, created with …
Controlling LED strips with Java
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, …
Reading the temperature, humidity, and pressure from a BME280 Sensor with Java, Pi4J, I2C, SPI, and JBang
To make it as easy as possible to get started with Java on the Raspberry Pi to interact with electronic components, I started a new section on the Pi4J website with JBang examples …
Using the Raspberry Pi Autofocus Camera Module 3 as HDMI camera
More than two years ago, I blogged about the use of the Raspberry Pi as an HDMI camera for the ATEM Mini . Although I have been using such a camera since then as my main Zoom …
Hidden Beauties of Java Enums
Let’s take a look at the power and beauty of what Java Enums can provide…
New Section Added to Foojay.io: Java Quick Start
Foojay.io aims to be the starting point for “all-things OpenJDK,” but during one of my morning walks the idea struck me that this site really needs complete beginner materials, …
HiveMQ Cloud, part 4 - Sending sensor data from Raspberry Pi Pico W to HiveMQ Cloud
Exactly one year ago, in December 2021, I published three articles of MQTT messaging with Raspberry Pi, Raspberry Pi Pico and HiveMQ Cloud . On June 30th of 2022, Raspberry Pi …
Create Music Bingo cards with iText
It has been a while since I last had to create documents in a program, and iText has been “on my radar” to try out for a while now. This weekend we had a party and …
Installing Java with SDKMAN on Raspberry Pi
If you create a new SD card for a Raspberry Pi with the operating system, you can choose the “Raspberry Pi OS Full (32-bit)” edition, which includes Java 11. But a lot …
Using a Raspberry Pi as HDMI camera
TL;DR; Yes, you can build your own Raspberry Pi HQ camera to use as an HDMI source for the ATEM Mini Looking for an affordable camera with HDMI output? Build one yourself with a …
HiveMQ Cloud, part 3 - Sending sensor data from Raspberry Pi Pico to HiveMQ Cloud
In the previous two posts in this series, we used Java on the Raspberry Pi mini-computer to send sensor data to HiveMQ Cloud, and visualize it on a dashboard.
HiveMQ Cloud, part 2 - Using MQTT and Raspberry Pi to Visualize Sensor Data on a TilesFX Dashboard
In the previous post we started our discovery of HiveMQ Cloud with Java on the Raspberry Pi. We created an application to send measurements of various sensors to the HiveMQ Cloud …
HiveMQ Cloud, part 1 - MQTT on Raspberry Pi, Send Sensor Data to HiveMQ Cloud with Java and Pi4J
A few years ago I did my first experiments with an MQTT server (Mosquitto) running on a Raspberry Pi to connect an Arduino and Raspberry Pi for the drumbooth of my son . The full …
JavaFX running in kiosk mode on the Raspberry Pi
The Raspberry Pi in combination with an inexpensive touch screen, makes a perfect controller for a machine or game console. Let’s see how we can use Java and JavaFX to build …
Device monitoring tool with JavaFX, FXGL and Mosquitto
In a previous post “Getting Started with FXGL Game Development” we already have taken a look at the FXGL game development framework developed by Almas Baimagambetov .