Closed ctrlaltca closed 4 years ago
Seeing that the minimum requested version is java 8u60, i tried installing java8 instead:
brew cask install adoptopenjdk8
(installed OpenJDK8U-jdk_x64_mac_hotspot_8u242b08.pkg)With the following result:
Exception in thread "main" java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at nsusbloader.Main.main(Main.java:7)
Third attempt using brew cask install adoptopenjdk
installed OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz , and ns-usbloader works fine.
Looks like this is a bug in JavaFX starting with macOS 10.15. Fixed in JavaFX 14.
A quick fix for this is to switch to javafx 14 and rebuild - it works without any issues for me but I also haven't given it any particular rigor in testing.
Modify pom.xml and change version to 14 for any of the javafx items that are currently version 11.
Why is this closed?
Because the problem seems not to be in ns-usbloader itself, but is caused by some broken combinations of Java and macOS.
I'd argue that it uses a dependency that is broken which can apparently be fixed by updating it.
Hi, all the text in the application is garbled:
Running on macOS Catalina 10.15.2, I followed these steps:
brew install openjdk
(this installed java 13)sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
as suggested by homebrew to make java visible to the system;java -jar ns-usbloader-1.0.jar
Terminal log: