You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Raspberry PI Zero v2 (Raspberry Pi OS) I have installed:
a) java v11 (openjdk version "11.0.21" 2023-10-17)
b) pigpio library
c) pi4j library (in /opt/pi4j/lib/ there are: pi4j-core.jar, pi4j-core-javadoc.jar, pi4j-core-sources.jar, pi4j-library-pigpio.jar, pi4j-plugin-pigpio.jar, pi4j-plugin-raspberrypi.jar, slf4j-api.jar, slf4j-simple.jar
and built it.
If I run command java App I get UnsatisfiedLinkError so I tried to solve it:
a) add --Dpi4j.library.path="/opt/pi4j/lib/lib/armhf/libpi4j-pigpio.so"
b) add file libpi4j-pigpio.so in the same dir as App.java and used --Dpi4j.library.path="local"
c) add System.setProperty("pi4j.library.path","/opt/pi4j/lib/lib/armhf/libpi4j-pigpio.so");
to source code before newAutoContext()
and I got the same result - error.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
On Raspberry PI Zero v2 (Raspberry Pi OS) I have installed:
a) java v11 (openjdk version "11.0.21" 2023-10-17)
b) pigpio library
c) pi4j library (in /opt/pi4j/lib/ there are:
pi4j-core.jar, pi4j-core-javadoc.jar, pi4j-core-sources.jar, pi4j-library-pigpio.jar, pi4j-plugin-pigpio.jar, pi4j-plugin-raspberrypi.jar, slf4j-api.jar, slf4j-simple.jar
I have created simple software:
and built it.
If I run command
java App
I getUnsatisfiedLinkError
so I tried to solve it:a) add
--Dpi4j.library.path="/opt/pi4j/lib/lib/armhf/libpi4j-pigpio.so"
b) add file
libpi4j-pigpio.so
in the same dir as App.java and used--Dpi4j.library.path="local"
c) add
System.setProperty("pi4j.library.path","/opt/pi4j/lib/lib/armhf/libpi4j-pigpio.so");
to source code before
newAutoContext()
and I got the same result - error.
Beta Was this translation helpful? Give feedback.
All reactions