kochedykov / jlibmodbus

JLibModbus - is an implementation of the Modbus protocol v1.1b in java language. Java modbus library. It works. Welcome.
http://kochedykov.github.io/jlibmodbus/
Apache License 2.0
307 stars 128 forks source link

java.lang.UnsatisfiedLinkError: when using old computer with windows 10 or 11 #92

Closed boerti71 closed 11 months ago

boerti71 commented 11 months ago

Hi!

I get the following issue witch is linked to Jlibmodbus: Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Users\flakt\AppData\Local\Temp\jna-97513220\jna5124748639377043137.dll: Can't find dependent libraries at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418) at java.base/java.lang.Runtime.load0(Runtime.java:852) at java.base/java.lang.System.load(System.java:2021) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826) at com.sun.jna.Native.(Native.java:140) at com.sun.jna.Pointer.(Pointer.java:41) at com.sun.jna.Structure.(Structure.java:2078) at jtermios.windows.JTermiosImpl$Port.(JTermiosImpl.java:58) at jtermios.windows.JTermiosImpl$Port.(JTermiosImpl.java:53) at jtermios.windows.JTermiosImpl.open(JTermiosImpl.java:348) at jtermios.JTermios.open(JTermios.java:422) at purejavacomm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:101) at com.intelligt.modbus.jlibmodbus.serial.SerialPortPJC.open(SerialPortPJC.java:77) at com.intelligt.modbus.jlibmodbus.net.ModbusConnectionSerial.openImpl(ModbusConnectionSerial.java:60) at com.intelligt.modbus.jlibmodbus.net.ModbusConnection.open(ModbusConnection.java:45) at com.intelligt.modbus.jlibmodbus.master.ModbusMaster.connectImpl(ModbusMaster.java:74) at com.intelligt.modbus.jlibmodbus.master.ModbusMaster.connect(ModbusMaster.java:88) at com.modbus.ModbusRTU.modbusConnect(ModbusRTU.java:150) at com.modbus.mainWindow$10.actionPerformed(mainWindow.java:1148) at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311) at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

any ideas what is wrong?

Thank you!

Best Regards

boerti71 commented 11 months ago

I found out that some devices struggling with HID, so I added following respository to my Maven pom.xml: [Pure Java HID API » 0.0.3

problem solved