I am a high school student working on a java application that communicates with an Arduino micro-controller vie USB. I'm using NetBeans IDE and the RXTX serial communication library.
Following RXTX install instructions I found online, I just right clicked on the libraries package in the navigator window on the left hand side and selected "Add Jar/Folder" selecting the RXTXcomm.jar. I then proceeded to code my program that opens serial port input and output streams. It worked perfectly inside the IDE test environment.
However, when I go to build my project, it builds properly, and upon running the executable jar file via a batch 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
I believe it is referencing the rxtxserial.dll. I looked up solutions to this and none of them have worked. Other questions I have found show possible solutions but none of these have worked, and any similar questions I have found have been for installing rxtx for the java runtime instead of a specific application. So far I have tried packaging it as a fat jar, I have tried adding the dll to the classpath through VM options, nothing seems to work. Can anyone help me here?