developersu / ns-usbloader

Awoo Installer and GoldLeaf uploader of the NSPs (and other files), RCM payload injector, application for split/merge files.
GNU General Public License v3.0
1.78k stars 117 forks source link

macOS arm64 support? #91

Open lihaochen910 opened 3 years ago

lihaochen910 commented 3 years ago
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)
developersu commented 3 years ago

Blocked due to https://bugs.openjdk.java.net/browse/JDK-8257222

(Also see similar issue for AdoptOpenJDK)

nastye commented 3 years ago

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

Screenshot 2021-05-02 at 12 11 32

I had to build libusb4java.dylib myself to make usb installs with GoldLeaf v0.8 work, but I'd be happy to share @developersu

DipsySu commented 3 years ago

hi how to build libusb4java.dylib ? 3q

nastye commented 3 years ago

There's official instructions at http://usb4java.org/nativelibs.html

developersu commented 3 years ago

Thank you.. will check once find time

developersu commented 2 years ago

@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!

agungrbudiman commented 2 years ago

libusb4java.dylib and ns usbloader build for macOS arm64.

cythb commented 2 years ago

@agungrbudiman Where should this file libusb4java.dylib put?

agungrbudiman commented 2 years ago

@cythb extract the jar release as zip file and then put the libusb4java.dylib in /org/usb4java/darwin-aarch64

developersu commented 2 years ago

Ok, thank you, @agungrbudiman . Added this one to repo.

Who want to test this? Link to jar-file

cythb commented 2 years ago

I have tested it, and it succeeds. Thank you, @developersu and @agungrbudiman.

cythb commented 2 years ago

Ok, thank you, @agungrbudiman . Added this one to repo.

Who want to test this? Link to jar-file

It works.

dephunk commented 2 years ago

Which java install and .jar file am i supposed to use? Nothing is working...

cythb commented 2 years ago

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)

Link to jar-file

dephunk commented 2 years ago

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)

Link to jar-file

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.

cythb commented 2 years ago

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)

Link to jar-file

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
dephunk commented 2 years ago

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.(ES2Pipeline.java:51) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) 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:829) Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: /Users/clancy/.openjfx/cache/16/libprism_sw.dylib: dlopen(/Users/clancy/.openjfx/cache/16/libprism_sw.dylib, 1): no suitable image found. Did find: /Users/clancy/.openjfx/cache/16/libprism_sw.dylib: mach-o, but wrong architecture /Users/clancy/.openjfx/cache/16/libprism_sw.dylib: mach-o, but wrong architecture java.lang.UnsatisfiedLinkError: /Users/clancy/.openjfx/cache/16/libprism_sw.dylib: dlopen(/Users/clancy/.openjfx/cache/16/libprism_sw.dylib, 1): no suitable image found. Did find: /Users/clancy/.openjfx/cache/16/libprism_sw.dylib: mach-o, but wrong architecture /Users/clancy/.openjfx/cache/16/libprism_sw.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.sw.SWPipeline.lambda$static$0(SWPipeline.java:42) at java.base/java.security.AccessController.doPrivileged(Native Method) at com.sun.prism.sw.SWPipeline.(SWPipeline.java:41) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) 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:829) 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:244) at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:286) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160) 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:829) 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:273) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:286) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160) 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:829)

cythb commented 2 years ago

@dephunk Try to reinstall JDK with correct architecture. image

dephunk commented 2 years ago

@dephunk Try to reinstall JDK with correct architecture. image

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

developersu commented 2 years ago

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!

dephunk commented 2 years ago

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.

developersu commented 2 years ago

@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).

Splafiou commented 2 years ago

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 ^^

nabbestia commented 2 years ago

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 :)

crospa91 commented 2 years ago

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!

nabbestia commented 2 years ago

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 :(

developersu commented 2 years ago

Maybe try Oracle's JDK.. Just a suggestion. Sorry, I have no idea :(

micharaze commented 2 years ago

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.

micharaze commented 2 years ago

It worked now for me after installing libusb with homebrew.

brew install libusb

mark-red commented 2 years ago

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.(ES2Pipeline.java:52) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.base/java.lang.Thread.run(Thread.java:833) Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: /Users/macbook/.openjfx/cache/17/libprism_sw.dylib: dlopen(/Users/macbook/.openjfx/cache/17/libprism_sw.dylib, 0x0001): tried: '/Users/macbook/.openjfx/cache/17/libprism_sw.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libprism_sw.dylib' (no such file) java.lang.UnsatisfiedLinkError: /Users/macbook/.openjfx/cache/17/libprism_sw.dylib: dlopen(/Users/macbook/.openjfx/cache/17/libprism_sw.dylib, 0x0001): tried: '/Users/macbook/.openjfx/cache/17/libprism_sw.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libprism_sw.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.sw.SWPipeline.lambda$static$0(SWPipeline.java:43) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at com.sun.prism.sw.SWPipeline.(SWPipeline.java:42) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.base/java.lang.Thread.run(Thread.java:833) 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:283) at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254) at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:264) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) ... 1 more Exception in thread "main" java.lang.RuntimeException: No toolkit found at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833)

Any help would be greatly appreciated

micharaze commented 2 years ago

@mark-red First of all ns-usbloader requires JDK 11, I don't know if 17 is supported already. It also looks like that your version is not build for the M1 (arm64) architecture. You can see that in the following error line:

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)

I would recommend to use the azul JKD 11 FX Version because this is the one which was successfully tested with ns-usbloader. https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx

mark-red commented 2 years ago

https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx

You are a legend, thank you so much, it worked like a charm

developersu commented 2 years ago

@mark-red please try it with zulu jdk. Right now openjdk you installed is not supported, however in future it should be..

Thank you for reporting anyway

PabloCortes33 commented 2 years ago

Hi guys! Finally did it, after many days of trying to install games in a jailbroken switch. I tried everything from splitting nsp's to installing every payload i could reach.

I have a MacBook Air M1, and a v1 Nintendo Switch running Atmosphere, at first i was trying to make it work by using tinfoil, because i could install <4gb games like a charm by uploading the into the sd card, but at the time i needed to install a larger file nothing worked.

I reached to the conclusion that the best way to make this happen is via usb, i woud't have to make the payload every time i extracted the sd and i would be a much smoothier way to install all games at once.

So, here it is (run everything on the terminal):

1.- Install python 3 via Homebrew: brew install python 2.- Install Py USB: pip3 install pyusb 3.- Install libusb: brew install libusb 4.- Install Java via Homebrew: brew install openjdk 5.- Download Azul Zulu Builds of OpenJDK (this is the only part that you don't need to use the terminal): link At the bottom of the page is the download link. 6.- Download ns-usbloader-5.2.jar from link 7.- Run this command on the ns-usbloader-5.2.jar directory: java -jar ns-usbloader-5.2.jar

The last step should open the ns-usbloader UI, this is everything you need to do from the mac side. The next step is hacking the Nintendo Switch and using Awoo. The Ns-usbloader UI will show you everything you need to do. Connect your Switch to the mac via USB, and open Awoo, load your nsp's to the ns-usbloader and upload them, the installer should recognize the files, wait for the install and voilá!

Spettacolo83 commented 2 years ago

https://github.com/developersu/ns-usbloader/issues/91#issuecomment-996485372

Hello there, I'm still having @mark-red issue even after installing this -> https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx

Any suggestion?

ConfettiLemon commented 2 years ago

Hi guys! Finally did it, after many days of trying to install games in a jailbroken switch. I tried everything from splitting nsp's to installing every payload i could reach.

I have a MacBook Air M1, and a v1 Nintendo Switch running Atmosphere, at first i was trying to make it work by using tinfoil, because i could install <4gb games like a charm by uploading the into the sd card, but at the time i needed to install a larger file nothing worked.

I reached to the conclusion that the best way to make this happen is via usb, i woud't have to make the payload every time i extracted the sd and i would be a much smoothier way to install all games at once.

So, here it is (run everything on the terminal):

1.- Install python 3 via Homebrew: brew install python 2.- Install Py USB: pip3 install pyusb 3.- Install libusb: brew install libusb 4.- Install Java via Homebrew: brew install openjdk 5.- Download Azul Zulu Builds of OpenJDK (this is the only part that you don't need to use the terminal): link At the bottom of the page is the download link. 6.- Download ns-usbloader-5.2.jar from link 7.- Run this command on the ns-usbloader-5.2.jar directory: java -jar ns-usbloader-5.2.jar

The last step should open the ns-usbloader UI, this is everything you need to do from the mac side. The next step is hacking the Nintendo Switch and using Awoo. The Ns-usbloader UI will show you everything you need to do. Connect your Switch to the mac via USB, and open Awoo, load your nsp's to the ns-usbloader and upload them, the installer should recognize the files, wait for the install and voilá!

THANK YOU THIS WORKED

StefanoStream commented 2 years ago

I followed @PabloCortes33 steps, installing Azul Zulu file zulu11.54.23-ca-fx-jdk11.0.14-macosx_aarch64.dmg I still get this error:

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)

How can I fix it? Is it possible that Azul Zulu for some reason didn't update the libraries? I've noticed that ns-usbloader is loading library from /.openjfx/.../17/ directory but I should installed version 11. How can I changed or force the version/directory where java is taking the library? How can I check if Azul Zulu installed his library correctly? Thanks!

newadventure079 commented 2 years ago

So is openjdk 17 not supported?

Dakshpro commented 2 years ago

I followed instructions @PabloCortes33 but still getting error:

Feb 27, 2022 11:46:54 AM com.sun.javafx.application.PlatformImpl startup WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @689eb690' Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/kiaara/.openjfx/cache/17/libprism_es2.dylib java.lang.UnsatisfiedLinkError: Can't load library: /Users/kiaara/.openjfx/cache/17/libprism_es2.dylib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393) 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.(ES2Pipeline.java:52) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.base/java.lang.Thread.run(Thread.java:833) Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/kiaara/.openjfx/cache/17/libprism_sw.dylib java.lang.UnsatisfiedLinkError: Can't load library: /Users/kiaara/.openjfx/cache/17/libprism_sw.dylib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393) 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.sw.SWPipeline.lambda$static$0(SWPipeline.java:43) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at com.sun.prism.sw.SWPipeline.(SWPipeline.java:42) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.base/java.lang.Thread.run(Thread.java:833) 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:283) at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254) at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:264) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) ... 1 more Exception in thread "main" java.lang.RuntimeException: No toolkit found at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833)

jaromirrivera commented 2 years ago

I was able to follow @PabloCortes33 instructions successfully. Be sure to download the latest Azul Zulu SDK instead of the linked version. It should be version Java 17 (LTS) on the download page.

Spettacolo83 commented 2 years ago

Thank you @jaromirrivera and @newadventure079. I installed version Java 17 (LTS). Now I DON'T have error of incompatible architecture (have 'x86_64', need 'arm64e') like before. Now I HAVE another error (similar but not the same) as @Dakshpro does:

Mar 04, 2022 5:21:31 PM com.sun.javafx.application.PlatformImpl startup WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @7f36e759' Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/x/.openjfx/cache/17/libprism_es2.dylib java.lang.UnsatisfiedLinkError: Can't load library: /Users/x/.openjfx/cache/17/libprism_es2.dylib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393) 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.<clinit>(ES2Pipeline.java:52) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.base/java.lang.Thread.run(Thread.java:833) Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/x/.openjfx/cache/17/libprism_sw.dylib java.lang.UnsatisfiedLinkError: Can't load library: /Users/x/.openjfx/cache/17/libprism_sw.dylib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393) 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.sw.SWPipeline.lambda$static$0(SWPipeline.java:43) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:42) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) at java.base/java.lang.Thread.run(Thread.java:833) 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:283) at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254) at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:264) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125) ... 1 more Exception in thread "main" java.lang.RuntimeException: No toolkit found at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) at java.base/java.lang.Thread.run(Thread.java:833)

Do you have any suggestion on how to fix this? Thanks!

jooles commented 2 years ago

I have the same error on M1 using the exact same JDK.. is this problem already solved somehow? :-/

Help appreciated!

alexplieu commented 2 years ago

I have the same error on M1 using the exact same JDK.. is this problem already solved somehow? :-/

Help appreciated!

I was getting the same error. It looks like you may have installed multiple java machines. Try to clean up your all your java virtual machine. Go to /Library/Java/JavaVirtualMachines/ and delete all (I've installed some many different Java version trying to fix this issue). If you follow @PabloCortes33 instructions above, just reinstall OpenJDK 11 link . Hope that helps.

Spettacolo83 commented 2 years ago

Thank you @alexplieu finally this fixed my issue! I run the following command from terminal:

sudo rm -rf /Library/Java/JavaVirtualMachines/

After closing the terminal, I downloaded OpenJDK 11 here and installed. Once finished, I was able to run ns-usbloader without restart my M1 Mac:

java -jar ns-usbloader-5.2.jar

jooles commented 2 years ago

Thanks everyone, working now! :)

suhli commented 2 years ago

libusb4java.dylib not working for my macbook pro 14' with m1 max my resolution:

  1. clone project
    git clone git@github.com:developersu/ns-usbloader.git
  2. clone usb4java:
    git clone git@github.com:usb4java/libusb4java.git
  3. install libusb
    brew install libusb
  4. build usb4java
    cd ./usb4java && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX="" && make install/strip DESTDIR=../../ns-usbloader/src/main/resources/org/usb4java/darwin-aarch64/
  5. build project
    cd ../../ns-usbloader && mvn clean package && java -jar ./target/ns-usbloader-5.2-SNAPSHOT-jar-with-dependencies.jar

enjoy it

Fede9997 commented 2 years ago

Just got this https://www.java.com/it/download/
run via terminal sudo rm -rf /Library/Java/JavaVirtualMachines/ and launch .jar built for arm and everything fine

putnam commented 2 years ago

Whenever I plug my switch in (with Tinleaf open), the USB connection will only work for a quick second before it drops it and the laptop begins charging off the Switch. What are you guys doing differently? I'm using a USB-C cable between the switch and an M1 Macbook Air. Once the USB connection switches to that charge mode, I get "No USB connection detected" in Tinleaf (a fork of Awoo, same underlying USB code).

I don't have any errors in the console for ns-usbloader.

ns-usbloader version: 5.2 OS version is 12.4 Tinleaf is 1.4.5 Java is zulu11.56.19-ca-fx-jdk11.0.15-macosx_aarch64

As another data point, the very same Switch and Tinleaf install works fine over USB using ns-usbloader 5.2 on Windows 11.

uzarubin commented 1 year ago

I have a compiled jar for M1 if anyone wants it. Works when I switch over to another M1 machine that has openjdk@11 installed.

ivocarvalho commented 1 year ago

Interested! Please let me know.