0

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)
user5313398
  • 713
  • 3
  • 9
  • 28

2 Answers2

2

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.

rm5248
  • 2,590
  • 3
  • 17
  • 16
  • I dont get you what path to set is it in eclipse? – user5313398 Sep 29 '16 at 17:47
  • In Eclipse, when you run a program, there is a dialog that you can use to set the program arguments and the VM arguments. See [this answer](http://stackoverflow.com/questions/957700/how-to-set-the-java-library-path-from-eclipse) for more details. – rm5248 Sep 29 '16 at 17:56
-1

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

samuel05051980
  • 369
  • 2
  • 2