I use Intellij idea.

There is a project. It uses the rxtx-2.2.jar . But when you run the application on the Raspberry pi get errors:

  java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "Thread-3" Exception in thread "Thread-4" java.lang.NoClassDefFoundError: Could not initialize class gnu.io.CommPortIdentifier 

At the same time, librxtx-java installed in the system, and the library is present in the project (and the CommPortIdentifier in it, respectively, too).

What to do?

  • Try explicitly the path to the directory in which rxtxSerial.so lie at startup, such as java -Djava.library.path=/path/to/lib-dir your.app.MainClass - zRrr
  • @zRrr, did not help. - DenShDen

0