Comments (5)
I also tried installing a different version of OpenJDK from the link in the README and had the same output there:
❯ /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home/bin/java -jar ~/Downloads/ModbusMechanic/ModbusMechanic.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/tb/dc9bcxw57mlf9_5s6ffd1kx80000gn/T/jna--87988168/jna2915415394505014223.tmp
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
at java.base/java.lang.Runtime.load0(Runtime.java:785)
at java.base/java.lang.System.load(System.java:1979)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:761)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736)
at com.sun.jna.Native.<clinit>(Native.java:131)
at jtermios.macosx.JTermiosImpl.<clinit>(JTermiosImpl.java:55)
at jtermios.JTermios.<clinit>(JTermios.java:317)
at purejavacomm.CommPortIdentifier$1.<init>(CommPortIdentifier.java:200)
at purejavacomm.CommPortIdentifier.getPortIdentifiers(CommPortIdentifier.java:193)
at com.intelligt.modbus.jlibmodbus.serial.SerialPortFactoryPJC.getPortIdentifiersImpl(SerialPortFactoryPJC.java:45)
at com.intelligt.modbus.jlibmodbus.serial.SerialPortAbstractFactory.getPortIdentifiers(SerialPortAbstractFactory.java:55)
at com.intelligt.modbus.jlibmodbus.serial.SerialUtils.getPortIdentifiers(SerialUtils.java:67)
at modbusmechanic.ModbusMechanic.getPortNames(ModbusMechanic.java:131)
at modbusmechanic.PacketFrame.getPortNames(PacketFrame.java:1662)
at modbusmechanic.PacketFrame.initComponents(PacketFrame.java:239)
at modbusmechanic.PacketFrame.<init>(PacketFrame.java:74)
at modbusmechanic.ModbusMechanic.main(ModbusMechanic.java:114)
from modbusmechanic.
Hi,
Thanks for reporting the issue. I did some research and this appears to be related to that JNA version not supporting the Apple Silicon architecture. I'll update JNA to a newer version which should resolve the error in the next release. If you want to update it on your own as a provisional workaround, just replace the JNA bundle with 5.7.0 or newer and update the manifest.txt to include the library's path. I only have access to x86 Apple hardware, so I cannot test.
from modbusmechanic.
Unfortunately it may not be that simple. I am guessing that JNA might have some breaking API changes, because it changes the error to:
❯ java -jar /Applications/ModbusMechanic/ModbusMechanic.jar
Exception in thread "main" java.lang.NoSuchMethodError: 'void com.sun.jna.Native.setPreserveLastError(boolean)'
at jtermios.macosx.JTermiosImpl.<clinit>(JTermiosImpl.java:55)
at jtermios.JTermios.<clinit>(JTermios.java:317)
at purejavacomm.CommPortIdentifier$1.<init>(CommPortIdentifier.java:200)
at purejavacomm.CommPortIdentifier.getPortIdentifiers(CommPortIdentifier.java:193)
at com.intelligt.modbus.jlibmodbus.serial.SerialPortFactoryPJC.getPortIdentifiersImpl(SerialPortFactoryPJC.java:45)
at com.intelligt.modbus.jlibmodbus.serial.SerialPortAbstractFactory.getPortIdentifiers(SerialPortAbstractFactory.java:55)
at com.intelligt.modbus.jlibmodbus.serial.SerialUtils.getPortIdentifiers(SerialUtils.java:67)
at modbusmechanic.ModbusMechanic.getPortNames(ModbusMechanic.java:131)
at modbusmechanic.PacketFrame.getPortNames(PacketFrame.java:1662)
at modbusmechanic.PacketFrame.initComponents(PacketFrame.java:239)
at modbusmechanic.PacketFrame.<init>(PacketFrame.java:74)
at modbusmechanic.ModbusMechanic.main(ModbusMechanic.java:114)
from modbusmechanic.
I was able to reproduce that exact error in 2.2 after replacing the JNA library. I updated the upstream serial library for the new API bindings and I no longer got errors with the newer JNA in v2.2.1 which is now posted. Now that it launches, 2.2.1 should support your M1 arch. Let me know if you still get errors.
from modbusmechanic.
Yes! It works, thank you :)
from modbusmechanic.
Related Issues (19)
- Display error message when serial port fails to open on RTU scanner function HOT 3
- Just information how to use HOT 1
- TimeoutException when using Slave ID other than 1 HOT 6
- Add signed int data types HOT 8
- Function Code 16 (0x10) Preset Multiple Registers mislabeled HOT 3
- RTU Slave Simulator doesn't update watch window HOT 2
- (Preset) Write Single Register (6) incorrect value transmission HOT 3
- [RTU] Allow for higher baud HOT 2
- java.lang.ArrayIndexOutOfBoundsException: 0 >= 0 HOT 4
- Register scan returns inconsistent results HOT 9
- Can't download HOT 1
- Lower Baud Rates as low as 110 [Feature Request] HOT 1
- Using hide zero option also hides negative Float entries HOT 3
- Linux - show only active ports HOT 2
- USB serial ports Linux HOT 7
- Status update in slave simulator HOT 2
- Feature Request: Write single register (0x06) HOT 3
- Not work RTU mode when press "Transmit packet" button HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modbusmechanic.