Help interfacing with a Java program

I’m using 64 bit Windows 7, and am having trouble communicating with my Arduino with a Java app I’m writing in Eclipse. I’ve added rxtxSerial.jar to the libraries, but when I try running the program I get the exception

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’ve read I need to do something with rxtxSerial.dll, but I’m not sure what?

Thanks!

It needs to be in your “path”. The one JAVA searches when it runs java code. I seem to recall it should be placed in your LIB directory under JAVA to be universally reachable. Things like this made just throw my hands up and give up on Java in favor of C#.

You could always check the RXTX website… lots of info there.
http://www.rxtx.org/

When you run your project from within Eclipse using either Run → Run Configurations or Run → Debug Configurations add the following to the VM arguments:

-Djava.library.path=

must be a directory that contains the native code DLL, not the JAR. JAR’s generally contain the java parts of the library and must be available on the CLASSPATH.

You can add the JAR to the runtime CLASSPATH in Eclipse by adding an external JAR via the project Properties → Java Build Path → Libraries gui.