This project provides some scripts to extend the official Raspberry Pi Operating System with additional tools to make it the perfect match for Java projects with Pi4J as described on the Pi4J website > Prepare a Raspberry Pi.
- Prepare an SD Card with the 64-bit version of the Raspberry Pi Operating System, see the Pi4J website > Prepare a Raspberry Pi > Write OS to SD card.
- Put the SD Card in your Raspberry Pi and start it.
- The board will probably reboot to do some basic settings.
- Make sure the board is connected to WiFi or cabled internet.
- Open the terminal and run this command:
curl -sL https://raw.githubusercontent.com/Pi4J/pi4j-os/main/script/prepare-for-java.sh | bash
- Make sure you see
All done! Have fun...
if the script finished. If not, you may need to run it again as one of the intermediate steps has stopped it. - You're done! Check the Pi4J website > Getting Started With Pi4J for the next steps. Have fun with #JavaOnRaspberryPi.
An additional Java (JBang) script is available to turn the desktop wallpaper into an information screen. This script will take an image as input, overlay some useful info as text (IP, Java version, etc.), and save this as a new image. This generated image is then pushed as the new wallpaper to the desktop.
- To install the script, open the terminal and run this command:
curl -sL https://raw.githubusercontent.com/Pi4J/pi4j-os/main/script/install-wallpaper.sh | bash
- Open the script:
sudo nano /etc/NetworkManager/dispatcher.d/99-ip-change-notify
- Adjust the
pi4j
username in the script (3 times) to match the one you use for your Raspberry Pi. E.g. on this line:IP_FILE="/home/pi4j/wallpaper/current_ip_$interface.txt
. - Save the file with
CTRL+X
+y
+ENTER
.
This will generate a result like this:
The original goal of this repository was to provide a build of the official Raspberry Pi OS with additional tools to prepare it for Java(FX) and Pi4J projects. Because it became difficult to support because of changes in the OS for the Raspberry Pi 5, we decided to stop this goal, and provide some scripts here that can help you to achieve the same result. You can still find the latest sources of the Pi4J OS here with the tag end-of-os.
This repository is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.