RaspberryPiMan
Posts: 6
Joined: Mon Jul 21, 2014 1:24 am

RXTX java.lang.UnsatisfiedLinkError Exception

Tue Jul 22, 2014 7:32 pm

Hello everyone..,

I'm following this tutorial:
http://www.drdobbs.com/jvm/control-an-a ... /240163864

which has a simple modification on the code published on arduino playground:
http://playground.arduino.cc/interfacing/java

However, I am still getting this error:

Code: Select all

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" 
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
	at java.lang.Runtime.loadLibrary0(Runtime.java:849)
	at java.lang.System.loadLibrary(System.java:1088)
	at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
	at embeddedRaspberry.JavaEmbeddedRaspberry.initialize(JavaEmbeddedRaspberry.java:36)
	at embeddedRaspberry.JavaEmbeddedRaspberry.main(JavaEmbeddedRaspberry.java:143)
C:\Users\ABDY\Documents\NetBeansProjects\JavaEmbeddedRaspberry\nbproject\remote-platform-impl.xml:99: The following error occurred while executing this line:
C:\Users\ABDY\Documents\NetBeansProjects\JavaEmbeddedRaspberry\nbproject\remote-platform-impl.xml:57: Remote command failed with exit status 1
BUILD FAILED (total time: 5 seconds)
On the Raspberry pi, I made sure that I have librxtxSerial.so inside /usr/lib/jni and a RXTXcomm.jar inside /usr/share/java/RXTXcomm.jar.
but the error still appear
On my host PC, i checked the remote platform configuration on NetBeans IDE:
1- Java.Class.Path = org-netbeans-modules-java-j2seembedded-probe.jar
2- Java.Library.Path = /usr/java/packages/lib/arm:/lib:/usr/lib

I will appreciate any help of how to setup RXTX Library to work correctly with java SE Embedded.
Help please!!! :(

Return to “Troubleshooting”