Closed Minisector closed 1 year ago
This will require pulling in a newer jssc (https://github.com/java-native/jssc/issues/74) and re-packaging. So this will be in the "next" release.
Thank you for the pointer! I have copied https://github.com/java-native/jssc/releases/download/v2.9.4/jssc-2.9.4.jar into the lib folder and changed ADTPro.command to load it instead of 2.9.2, and now it works!! @david-schmidt thanks a lot!
Minnie
I am also trying to use ADTPro 2.1.0 on a Mac Mini M1. But I am not as successful as you. Can you suggest what I am doing wrong? I am using MacOS Montery version 12.5.1
Could not load the jssc library: Couldn't load library library jssc
, So, I try the same solution suggested:
/Applications/ADTPro-2.1.0/lib/jssc/jssc-2.9.2.jar
/Applications/ADTPro-2.1.0/lib/jssc/jssc-2.9.4.jar
ADTPro.command
file as follows:
--- ADTPro.command.bak 2023-07-24 19:43:09.000000000 -0400
+++ ADTPro.command 2023-07-24 19:43:17.000000000 -0400
@@ -40,4 +40,4 @@
fi
fi
-$HEADLESS"$MY_JAVA_HOME"java -Xms256m -Xmx512m -cp "$ADTPRO_HOME"lib/ADTPro-2.1.0.jar:"$ADTPRO_HOME"lib/AppleCommander/AppleCommander-1.3.5.13-ac.jar:"$ADTPRO_HOME"lib/jssc/jssc-2.9.2.jar:"$ADTPRO_HOME"lib/jssc/slf4j-nop-1.7.9.jar org.adtpro.ADTPro $ +$HEADLESS"$MY_JAVA_HOME"java -Xms256m -Xmx512m -cp "$ADTPRO_HOME"lib/ADTPro-2.1.0.jar:"$ADTPRO_HOME"lib/AppleCommander/AppleCommander-1.3.5.13-ac.jar:"$ADTPRO_HOME"lib/jssc/jssc-2.9.4.jar:"$ADTPRO_HOME"lib/jssc/slf4j-nop-1.7.9.jar org.adtpro.ADTPro $
Re-launch and new exception is displayed:
$ ./ADTPro.command ADTPro Server version 2.1.0
Exception in thread "main" java.lang.NoClassDefFoundError: jssc/SerialPortTimeoutException
at org.adtpro.gui.SerialConfig.enumeratePorts(Unknown Source)
at org.adtpro.gui.SerialConfig.
- Clicking button "Serial" continues to show error, "There are no serial ports",
![Screen Shot 2023-07-24 at 7 47 09 PM](https://github.com/ADTPro/adtpro/assets/972584/a2c644f0-9993-42b9-b260-7b7797f4c554)
- But, there is a serial port,
$ ls -lrt /dev/usbserial crw-rw-rw- 1 root wheel 0x9000002 Jul 24 17:14 /dev/tty.usbserial-220 crw-rw-rw- 1 root wheel 0x9000003 Jul 24 19:29 /dev/cu.usbserial-220
And I can communicate through this serial port using cu,
sudo cu -l /dev/cu.usbserial-220 -s 9600
If I click the Audio button, another exception is displayed,
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: jssc/SerialPortException at org.adtpro.gui.Gui.startComms(Unknown Source) at org.adtpro.gui.Gui.actionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:411) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389) at java.desktop/java.awt.Component.processEvent(Component.java:6391) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743) 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) Caused by: java.lang.ClassNotFoundException: jssc.SerialPortException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 37 more
Also, I have tried,
java -version
outputs Unable to locate a Java Runtime.
brew install openjdk
), using command, MY_JAVA_HOME=/opt/homebrew/Cellar/openjdk/20.0.1/bin/ ./ADTPro.command
, same error.jre-8u381-macosx-aarch64.dmg
, same error.jre-8u381-macosx-x64.dmg
, same error.Seems like some kind of issue with the classpath to cause this error,
Exception in thread "main" java.lang.NoClassDefFoundError: jssc/SerialPortTimeoutException
Sorry for the noise, I had forgotten to replaced jssc-2.9.4.jar into the correct folder after re-installing ADTPro a few times.
I have re-tested ADTPro 2.1.0, on Mac M1, with both intel and arm64 Java 8 JRE from Oracle, and both are loading the serial port successfully. I think the initial problem was with using a previous release of java, that it would not load the newer build of jssc.
No problem - if there was faster turnaround on releases, you'd have this already by default. Glad you got it going, though.
Hello there, first of all - I love ADTPro :-)
I am trying to run ADTPro 2.1.0 on a Mac Mini M1 running Mac OS Big Sur 11.6, with the latest JVM:
ADTPro cannot open the "Serial configuration" window. When launching ADTPro.command I get the following:
..and when I select "Serial configuration", the following exception appears:
All of this on a clean install. All I tried so far has failed... could you please help me out? I have no issue with 2.0.3. Thanks for reading!
Minnie