Hello..
I would like to run pi4j example "ControlGpioExample" in Raspberry as jar executable file created from Eclipse (On my Linux laptop).
I imported the pi4j to my project but when i run is as java application, it give me respective error.
Error:
<--Pi4J--> GPIO Blink Trigger Example ... started.
OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/libpi4j.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Apr 05, 2015 2:30:23 PM com.pi4j.util.NativeLibraryLoader load
SEVERE: Failed to load library [pi4j] using the System.load(file) method using embedded resource file: [jar:file:/home/viru/Downloads/pi4j-0.0.5/lib/pi4j-core.jar!/lib/soft-float/libpi4j.so]
Apr 05, 2015 2:30:23 PM com.pi4j.util.NativeLibraryLoader load
SEVERE: ERROR: The native library [pi4j : libpi4j.so] could not be found in the JVM library path nor could it be loaded from the embedded JAR resource file; you may need to explicitly define the library path '-Djava.library.path' where this native library can be found.
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.pi4j.wiringpi.Gpio.wiringPiSetup()I
at com.pi4j.wiringpi.Gpio.wiringPiSetup(Native Method)
at com.pi4j.io.gpio.RaspiGpioProvider.<init>(RaspiGpioProvider.java:47)
at com.pi4j.io.gpio.GpioFactory.getDefaultProvider(GpioFactory.java:102)
at com.pi4j.io.gpio.impl.GpioControllerImpl.<init>(GpioControllerImpl.java:67)
at com.pi4j.io.gpio.GpioFactory.getInstance(GpioFactory.java:85)
at BlinkTriggerGpioExample.main(BlinkTriggerGpioExample.java:53)