-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS arm64 support? #91
Comments
In the meantime, you can use a build of the Zulu-JDK with FX support: 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. |
libusb4java.dylib and ns usbloader build for macOS arm64. |
@agungrbudiman Where should this file |
@cythb extract the jar release as zip file and then put the |
Ok, thank you, @agungrbudiman . Added this one to repo. Who want to test this? Link to jar-file |
I have tested it, and it succeeds. Thank you, @developersu and @agungrbudiman. |
It works. |
Which java install and .jar file am i supposed to use? Nothing is working... |
|
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: |
Can you upload some log for running this jar? Also print the version of java:
|
openjdk 11.0.12 2021-07-20 LTS |
@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 |
@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. |
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. |
Thank you @jaromirrivera and @newadventure079.
Do you have any suggestion on how to fix this? |
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. |
Thank you @alexplieu finally this fixed my issue!
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:
|
Thanks everyone, working now! :) |
libusb4java.dylib not working for my macbook pro 14' with m1 max
git clone [email protected]:developersu/ns-usbloader.git
git clone [email protected]:usb4java/libusb4java.git
brew install libusb
cd ./usb4java && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX="" && make install/strip DESTDIR=../../ns-usbloader/src/main/resources/org/usb4java/darwin-aarch64/
cd ../../ns-usbloader && mvn clean package && java -jar ./target/ns-usbloader-5.2-SNAPSHOT-jar-with-dependencies.jar enjoy it |
Just got this https://www.java.com/it/download/ |
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 As another data point, the very same Switch and Tinleaf install works fine over USB using ns-usbloader 5.2 on Windows 11. |
I have a compiled jar for M1 if anyone wants it. Works when I switch over to another M1 machine that has |
Interested! Please let me know. |
The solution to this is quite simple - just build it yourself. Preparations
Build stepsFrom a terminal window, run the following commands:
Afterwards, the current version (ns-usbloader-6.2-20221204.jar as of now) will be located in the target directory. Run it via: Downloadns-usbloader-6.2 (arm64): built using openjdk 11.0.17 2022-10-18 LTS Corretto |
ns-usbloader-7.0 (arm64): built using openjdk 19.0.2 2023-01-17 |
It's kinda fixed. At least in latest version you can just use Now to people, who are interested and want to understand JavaFX world. Workaround is:
Correct solution: Dear reader, if you know how to do it right, please let me know =) |
I have just downloaded 7.0 M1 version but I'm having the same issue I had before. Awoo is connect to USB but the files sent by NS USBLoader does not appear in Awoo. I'm using Java 19.0.2 for M1. I'm noob with Java. Somebody knows how to log the error?
|
@alexnovelli Hi, please try this one. (It's the same build but with Once something failed, click on the last tab on the left-hand side panel. Errors should appear appear in there. Also you can start application from terminal (command line), e.g. UPD: I guess it's because I placed library into the wrong place. In debug it may say where it's suppose to be. In terminal. |
Does't work... The errors opening through Terminal: After open app:
After tried to send through USB:
|
@alexnovelli Thank you, it helps! If it still doesn't work, install libusb manually via |
Works with |
Well.. yeah.. you're welcome 🥲 |
Hey guys how do install it ? I have installed Zulu but what's the next step ? |
@developersu This won't work because the
Also known as dynamic linking, people are required to have this library in place. If you want people to be able to run this without installing libusb first, you need to build a static version of the library:
This will give us a statically linked |
@StarHack I'm afraid it doesn't work because usb4java seeks for this lib in the wrong place, and since I don't have time to test this (and mac) now it will remain the same for some time. |
@developersu Yes, and that's because it's a dynamically linked version of the library. Once you create a static build as described above this won't happen as it won't have to seek for this library at all since it will be included in usb4java. In fact I was not talking about shipping the entire folder, I was talking about shipping a different build of usb4java only. I attached static builds for darwin (x86_64 and arm64). |
@StarHack dylib is an extension for dynamically linked library.. you've attached dylibs in your zip.. |
@developersu the dylib file is itself a dynamic library, but the libusb library (which it wraps) is built statically and then linked into the libusb4java library (and thus included in it). So you have a dynamic library that has linked in a static library, and otherwise dynamically links to all the other stuff it needs. You can confirm that libusb is baked into the libusb4java dylib file by running Since it's already built-in to the usb4java library there's no need to worry about where libusb files live on disk at all. |
@putnam dylib compiled for apple silicone is not built in to the usb4java library (used, and available in maven central, including latest versions) and that's why it doesn't work and people installs libusb via brew. If you know how to make it work please do and let me know. In result it should be fat jar, not multiple files. I think that the best solution is to place pre-compiled libusb (libusb4java.dylib or whatever else) inside jar. If you think that it should be static lib, I'm fine with it. Shared goes too. Also I highly appreciate your advices and support and I'm happy that you [personally and all the] people are trying to help solving this. |
Hi, |
@skoshy I guess it's because of C hub on Mac, not because of this plugin itself. So I guess there is no solution for this. |
The text was updated successfully, but these errors were encountered: