java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
阿新 • • 發佈:2018-12-31
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 at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123) at com.swing.util.SerialReader.open(SerialReader.java:82) at com.swing.view.Test.openSerialPort(Test.java:58) at com.swing.view.Test.<init>(Test.java:17) at com.swing.view.Login.getIcCard(Login.java:115) at com.swing.view.Login.<init>(Login.java:50) at com.swing.view.Login.main(Login.java:43)
1、錯誤原因
缺少rxtxParallel.dll和rxtxSerial.dll檔案
2、解決方法
把rxtxParallel.dll、rxtxSerial.dll拷貝到:C:\WINDOWS\system32下。
rxtxParallel.dll 放在%java_home%\jre\lib\ext下
rxtxSerial.dll 放在%java_home%\jre\bin下
3、下載連結:
連結: https://pan.baidu.com/s/15P64qdz2fgBUhL2ZHB4L9Q 提取碼: jx2m