I just added “-Djava.library.path=” to the “VM Arguments” under Run Configuration in Eclipse and everything works fine until I tried to add an external JAR file. I get the following error:
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
Am I not setting something properly in Eclipse?
The exception indicates that the class
gnu.io.RXTXCommDrivertries to load a native library, which would be namedrxtxSerial.dllon Windows andrxtxSerial.soon Linux, and the JVM cannot find it in the directories listed injava.library.path. Have you tried to add a JAR containing the library tojava.library.path? I don’t think that’s possible, it has to be a directory containing the extracted library file.