user5313398
user5313398

Reputation: 753

Serial port library giving error java.lang.UnsatisfiedLinkError:

I have downloaded this library from this link http://rxtx.qbang.org/wiki/index.php/Main_Page. I have google a number of pages and first I add via the build path method and add the RXTXcomm.jar. Then I have also add here C:\Program Files(86)\Java\jre7\lib\ext folder also added this .jar file. Yet I still getting this error when I try to run or compile my programme on eclipse

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(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123)
    at read1.TwoWaySerialComm.connect(TwoWaySerialComm.java:21)
    at read1.TwoWaySerialComm.main(TwoWaySerialComm.java:108)

Upvotes: 0

Views: 659

Answers (2)

rm5248
rm5248

Reputation: 2645

You need to set java.library.path when you are starting your program. This will let Java be able to find the native C code that is used in order to talk with the serial ports.

Upvotes: 2

samuel05051980
samuel05051980

Reputation: 409

This library as been deprecated. Use new libraries like serialpundit, pyserial etc.

Upvotes: -1

Related Questions