#74 Operating IO pins on the Raspberry PI Zero W
While Java programming I started to wonder if I could program a pi board with java. During my research I found out that it is possible and there is the Java ME version that is specifically designed to be used in embedded devices.
Make sure Java & the WiringPi library is installed on your DietPi.
Now open the dietpi-launcher.
Install Optimized Software > Browse Software > Java
Install Optimized Software > Browse Software > WiringPi
Setting up the APP
Compile the app with Eclipse.
Now build the
.class files into a
.jar file on windows.
This makes one
.jar file and compresses it for easy distribution.
JavaSE1.8 is selected in Eclipse so that it can run on the PI’s
openjdk version "1.8.0_212".
"C:\Program Files\Java\jdk-16.0.2\bin\jar" cvfm GPIOPinTestMain.jar manifest.txt GPIOPinTestMain.class
N.B The manifest file must have an open newline at the end!
.jar file is created you can now upload it to the PI’s usr dir e.g
Install OPENSSH to allow
INSTALL ProFTPD so allow
Download the code below