Sometimes, it is very annoying to know that you just cannot install your Rxtx library in the JAVA_HOME (lack of admin privilege, you don’t want to clutter your JAVA_HOME with trashes, you need easy uninstallation, etc).
So, I’ve looked around in JNI usage, and I found a way to handle this problem.
- Put your Rxtx library (RXTXcomm.jar, librxtxParallel.so, librxtxSerial.so) in the local project directory.
- Run your project with this argument: -Djava.library.path=<your local Rxtx project directory>
If you use Netbeans, you can add the argument in: Project Properties -> Run -> VM Options

Thanx a lot… it helps me lot.
Comment by bharat patel — May 10, 2012 @ 10:04 pm