Search code examples
javaarduinolibrariesunsatisfiedlinkerrorrxtx

Getting UnsatisfiedLinkError: no rxtxSerial in java.library.path for Mac


I am trying to use rxtx as a way for arduino to communicate via serial port to my java program. However, despite trying many versions of rxtx downloads as well as the many answers to questions like this on stack overflow, I cannot seem to get rid of this error.

I have added to VM options the path to my librxtxSerial.jnilib file as well as RXTXcomm.jar. I have tried all of the downloads : http://rxtx.qbang.org/wiki/index.php/Download


Solution

  • I'd advise you to move to nrjavaserial as it is really the next (maintained) version of RXTX. The code hasn't changed significantly but they include the native libraries (which you're missing) in the Jar file so you don't have to have the Java side and the native side. I've used it for Bluetooth projects on Mac and Linux and it works well.