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?
rxtxSerial.solie at startup, such asjava -Djava.library.path=/path/to/lib-dir your.app.MainClass- zRrr