Hello, i've tried multiple projects with external Jars and natives. Everytime i try to launch, I get unsatisfiedlink errors, I try to use the -Djava.library.path option and it is not working... i also tried to create runnable jars, fat jar but i'm always getting this error. I've also tried to do: Code: static{ try { System.load("test_lib/librxtxSerial.so"); }catch(UnsatisfiedLinkError e) { e.printStackTrace(); System.exit(1); } Directly in the main class, but no success... Anyone have a solution or any hint ? Thanks It's working perfectly fine on a ubuntu PC..
ubuntu@udoo:~/Desktop/test/libs$ ls RXTXcomm.jar librxtxSerial.so ubuntu@udoo:~/Desktop/test/libs$ cd .. ubuntu@udoo:~/Desktop/test$ ls Wodka_fat.jar libs ubuntu@udoo:~/Desktop/test$ java -jar Wodka_fat.jar 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:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123) at controller.utilities.SerialCommunicator.<init>(SerialCommunicator.java:28) at controller.WodkaController.<init>(WodkaController.java:27) at controller.WodkaController.main(WodkaController.java:50)
Have never used these pkgs... but presuming you used steps similar to those in here: http://rxtx.qbang.org/wiki/index.php/In ... _your_path What is the -D setting you are using ? Some more tips at: http://stackoverflow.com/questions/1075 ... rown-while /venkat
installing lib with terminal Code: sudo apt-get install librxtx-java After doing this, the libs should be in /usr/lib/jni Now just run the jar and tell the JVM to look in this folder for the library Code: java -Djava.library.path=/usr/lib/jni -jar FileName.jar Sucess! thx for help