0

I am trying to set low latency when using rxtx library, the error that I am getting while running it under Ubuntu/Linux is:

UnsatisfiedLinkError: gnu.io.RXTXPort.nativeSetLowLatency()Z

It seems like a problem with a missing library but it seems to me like everything is in place (all so files (librxtxI2C.so, librxtxParallel.so, librxtxRaw.so, librxtxSerial.so) are in jre/lib and the jar is in jre/lib/ext - RXTXcomm.jar)

Any idea what could be the problem here?

karruma
  • 768
  • 1
  • 12
  • 32
  • I get a similar error on OSX. Other functions work fine (reading, writing etc.) but I can't all setLowLatency(). – mo-seph Mar 12 '14 at 14:10

1 Answers1

0

Instead of putting those libraries directly into your JRE, I'd recommend setting your classpath and native library directory explicitly at runtime. You can do this with:

java -Djava.library.path=<path-to-SO-files> -classpath <your-jarfile>   MainClass
JohnnyO
  • 3,018
  • 18
  • 30
  • This is being run as an applet from a browser, it would be better to have it fixed in a outright way. The thing is that it doesn't seem to find the libraries and it can the other ones - am I missing any specific library here? – karruma Aug 15 '13 at 19:55
  • Running as an applet is an important detail you left out. Is your applet signed and bundled with the appropriate libraries? Putting things in your JRE folder won't work if you want to run the applet on another machine. – JohnnyO Aug 15 '13 at 20:04
  • Yes it is signed, but not bundled with the other libraries. It should be able to use the ones that are in the JRE, correct? – karruma Aug 15 '13 at 23:16