ns-usbloader
ns-usbloader copied to clipboard
macOS arm64 support?
kanbaru@MacBook-Air ~ % java -version
openjdk version "16" 2020-11-11
OpenJDK Runtime Environment Microsoft (build 16+10-20201111)
OpenJDK 64-Bit Server VM Microsoft (build 16+10-20201111, mixed mode)
kanbaru@MacBook-Air ~ % lipo -archs /usr/bin/java
x86_64 arm64e
kanbaru@MacBook-Air ~ % java -jar ~/Downloads/ns-usbloader-5.0.jar
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib: dlopen(/Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib: mach-o, but wrong architecture
/Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib: mach-o, but wrong architecture
java.lang.UnsatisfiedLinkError: /Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib: dlopen(/Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib: mach-o, but wrong architecture
/Users/Kanbaru/.openjfx/cache/11/libprism_es2.dylib: mach-o, but wrong architecture
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2407)
at java.base/java.lang.Runtime.load0(Runtime.java:747)
at java.base/java.lang.System.load(System.java:1857)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:205)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:185)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:157)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:50)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:377)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:832)
Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: /Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib: dlopen(/Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib, 1): no suitable image found. Did find:
/Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib: mach-o, but wrong architecture
/Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib: mach-o, but wrong architecture
java.lang.UnsatisfiedLinkError: /Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib: dlopen(/Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib, 1): no suitable image found. Did find:
/Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib: mach-o, but wrong architecture
/Users/Kanbaru/.openjfx/cache/11/libprism_sw.dylib: mach-o, but wrong architecture
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2407)
at java.base/java.lang.Runtime.load0(Runtime.java:747)
at java.base/java.lang.System.load(System.java:1857)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:205)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:185)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:157)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:377)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:832)
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:832)
Blocked due to https://bugs.openjdk.java.net/browse/JDK-8257222
In the meantime, you can use a build of the Zulu-JDK with FX support:
https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx
I had to build libusb4java.dylib myself to make usb installs with GoldLeaf v0.8 work, but I'd be happy to share @developersu
hi how to build libusb4java.dylib ? 3q
There's official instructions at http://usb4java.org/nativelibs.html
Thank you.. will check once find time
@nastye Hi, I don't have any chance to build libusb4java.dylib so could you please share this?
And also anyone else who did it please share your lib. Thanks!
libusb4java.dylib and ns usbloader build for macOS arm64.
@agungrbudiman Where should this file libusb4java.dylib put?
@cythb extract the jar release as zip file and then put the libusb4java.dylib in /org/usb4java/darwin-aarch64
I have tested it, and it succeeds. Thank you, @developersu and @agungrbudiman.
Ok, thank you, @agungrbudiman . Added this one to repo.
Who want to test this? Link to jar-file
It works.
Which java install and .jar file am i supposed to use? Nothing is working...
Which java install and .jar file am i supposed to use? Nothing is working...
openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)
Which java install and .jar file am i supposed to use? Nothing is working...
openjdk 11.0.12 2021-07-20 LTS OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS) OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)
I installed this one - https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx
I get this error: Java application launch failed.
Which java install and .jar file am i supposed to use? Nothing is working...
openjdk 11.0.12 2021-07-20 LTS OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS) OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)I installed this one - https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx
I get this error: Java application launch failed.
Can you upload some log for running this jar?
Also print the version of java:
java --version
openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)
clancy@Clancys-MacBook-Air ~ % java -jar /Users/clancy/Downloads/ns-usbloader-5.2-SNAPSHOT-jar-with-dependencies.jar
Sep. 15, 2021 9:41:13 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @553f5e1f'
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/clancy/.openjfx/cache/16/libprism_es2.dylib: dlopen(/Users/clancy/.openjfx/cache/16/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/clancy/.openjfx/cache/16/libprism_es2.dylib: mach-o, but wrong architecture
/Users/clancy/.openjfx/cache/16/libprism_es2.dylib: mach-o, but wrong architecture
java.lang.UnsatisfiedLinkError: /Users/clancy/.openjfx/cache/16/libprism_es2.dylib: dlopen(/Users/clancy/.openjfx/cache/16/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/clancy/.openjfx/cache/16/libprism_es2.dylib: mach-o, but wrong architecture
/Users/clancy/.openjfx/cache/16/libprism_es2.dylib: mach-o, but wrong architecture
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)
at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:69)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.prism.es2.ES2Pipeline.
@dephunk Try to reinstall JDK with correct architecture.

@dephunk Try to reinstall JDK with correct architecture.
zulu11.50.19-ca-jdk11.0.12-macosx_aarch64.jar is the one i installed.
EDIT Turns out i needed zulu11.50.19-ca-fx-jdk11.0.12-macosx_aarch64.dmg instead.
FINALLY WORKS! YES Thankyou
Few days ago on OpenJDK 17 release developers said that they had added macOS/AArch64 support, so it should be working now.
As for OpenJFX (JavaFX) I didn't find any information. Anyway updated this to latest available version. Hope it works now.
Also thank you for testing!
Thanks for the update @developersu Should I be using the Legacy or standard .jar? Neither seem to work with 'Install over USB' but 'Install over LAN' is working.
@dephunk no problem =)
JAR with no postfixes recommended for Windows users, Linux users and MacOS users who're using Mojave or later versions.
JAR with '-legacy' postfix is for MacOS users who're still using OS X released before (!) Mojave. (It also works for Linux and for Windows but sometimes it doesn't work for Windows and it doesn't work for modern MacOS).
Hy ;)
I have an MBair M1 on Monterey 12.0.1 App it's running, I want to use 'Install over USB' but it's not working with ns-usbloader-5.2.jar. Connection with Switch is not established
But It's strange Install over LAN' is working ^^
hello guys. I need help please. I have Mac mini m1 with macOS 12. I tried everything, I installed Zulu (this https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx ) but ns it doesn't work. After some time, it closed automatically and I literally can do nothing :(, and the switch doesn't appear via usb. What can I do? do I need other ns version or Zulu version?
this is the message error https://pastebin.com/ynRtidvq thanks and sorry for my English..tried my best :)
hello guys. I need help please. I have Mac mini m1 with macOS 12. I tried everything, I installed Zulu (this https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx ) but ns it doesn't work. After some time, it closed automatically and I literally can do nothing :(, and the switch doesn't appear via usb. What can I do? do I need other ns version or Zulu version?
this is the message error https://pastebin.com/ynRtidvq thanks and sorry for my English..tried my best :)
Same here!
hello guys. I need help please. I have Mac mini m1 with macOS 12. I tried everything, I installed Zulu (this https://www.azul.com/downloads/zulu-community/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx ) but ns it doesn't work. After some time, it closed automatically and I literally can do nothing :(, and the switch doesn't appear via usb. What can I do? do I need other ns version or Zulu version?
this is the message error https://pastebin.com/ynRtidvq thanks and sorry for my English..tried my best :)
help please :(
Maybe try Oracle's JDK.. Just a suggestion. Sorry, I have no idea :(
Hy ;)
I have an MBair M1 on Monterey 12.0.1 App it's running, I want to use 'Install over USB' but it's not working with ns-usbloader-5.2.jar. Connection with Switch is not established
But It's strange Install over LAN' is working ^^
I have the same Issue with my MBAir M1, after click the upload button its loading endless and doesn't shows any files on Awoo. Also tried with Goldleaf, doesn't works either. The Interrupt button is also not doing anything then.
It worked now for me after installing libusb with homebrew.
brew install libusb
Can anyone help me, I have a macbook pro (m1 pro), I can't get ns-usbloader to run, it always fails to launch and I am a bit new to this. here is my Java version: openjdk version "17.0.1" 2021-10-19 OpenJDK Runtime Environment (build 17.0.1+12-39) OpenJDK 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)
Here is the error, it is a quantumrenderer error:
MacBook-Pro ~ % java -jar ~/Downloads/ns-usbloader-5.2-legacy.jar
Dec 17, 2021 2:55:18 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @1f508f09'
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/macbook/.openjfx/cache/17/libprism_es2.dylib: dlopen(/Users/macbook/.openjfx/cache/17/libprism_es2.dylib, 0x0001): tried: '/Users/macbook/.openjfx/cache/17/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libprism_es2.dylib' (no such file)
java.lang.UnsatisfiedLinkError: /Users/macbook/.openjfx/cache/17/libprism_es2.dylib: dlopen(/Users/macbook/.openjfx/cache/17/libprism_es2.dylib, 0x0001): tried: '/Users/macbook/.openjfx/cache/17/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libprism_es2.dylib' (no such file)
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:217)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:197)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:138)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:63)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at com.sun.prism.es2.ES2Pipeline.
Any help would be greatly appreciated