简体   繁体   中英

Linux serial port communication using java and RXTX lib

I create a program to communicate with serial ports in linux, I used Netbeans IDE for this , and I added rxtx jar file and its driver.

It is working fine when I run it from Netbeans but it gives an error when I try to run it from outside of Netbeans.

Error is:

driver are not linked while loading drivers.

I put rxtx.jar in ext folder of jre AND driver are in the bin folder

Check that the LD_LIBRARY_PATH environment variable is pointing to a folder in which you have your RxTx native libraries. You can tell java to use concrete folder as a library folder by adding -Djava.library.path=/path/to/my/dll parameter to the java invocation from command line.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM