-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Support for Windows on ARM 64-bit #443
Comments
Thanks for reporting.
Don't think so. Or does the application work? Please disable the Flatlaf window decorations (that uses the DLL), via command line option: (see FlatLaf System Properties)
Then it should work without exception.
Not at the moment. Simply because I don't have a machine to build and test it. Anyway I'm very interested in at least avoiding this exception, but I don't know how to detect whether running on ARM CPU. import java.util.Properties;
public class DumpSystemProperties
{
public static void main( String[] args ) {
Properties properties = System.getProperties();
properties.keySet().stream().sorted().forEach( key -> {
System.out.println( key + " = '" + properties.getProperty( (String) key ) + "'" );
});
}
} |
The application works as I don't know what the Window decoration does exactly. os.arch=aarch64 This means you are running on ARM 64-bit. I think now there is official support for Windows on ARM64 since Java 16/17 (I am using Bellsoft) I tried to run my application on a Mac with M1 processor running Windows 11 in a virtual machine in Parallels. |
Here are the most interesting properties for Windows 11 on Arm 64-bit:
Using JShell: |
Thanks for the info.
This enables menu bar embedded into window title bar.
Many thanks for this hint. Have an M1 Mac. 😄 A fix for the exception is in latest Would be great if you could try it out. |
I don't see an exception anymore, so that looks good. I have now installed Eclipse on Windows 11 Arm64 so I can debug faster. Do you intend to add a .dll in the native part for Windows the coming year? There are now only two for x86 and x86_64. Would be nice to support all ARM platforms. |
It seems the original error is now solved with ARM64 bit Windows, but happens now on Windows x86, 32-bit on the 2.0rc1. The program continues so it is not a big problem, but it is ugly. |
What exactly do you mean. What Java version / vendor do you use? Just tried with a 32bit JRE (17.0.1 from adoption.net) on Windows 10 64bit and it works fine. |
yes, there was an UnsatisfiedLinkError with Bellsoft 17.0.1 on Windows 10 32-bit |
Tried Bellsoft 17.0.1 32bit JRE and it works fine (on Windows 10 64bit; don't have 32bit Windows anymore) What it the value of system property |
It was not my own computer, so I cannot check directly. So I will try to find a virtual machine with Windows 10 32-bit. It is not a showstopper as the program continues. |
I have downloaded Windows 10 32-bit in Parallels and you are right. There is no issue with FlatLaf on Windows 32-bit in this virtual machine. I think there is an issue with the other computer and not with FlatLaf. So sorry to bother you. |
I use a Windows on ARM machine (Surface Pro X, to be specific) and tried running a FlatLaf application on it. Didn't encounter any crash or error with the latest stable (v3.1.1), but embedded menu bar seems unavailable.
AFAIK GitHub Actions do not offer a Windows on ARM VM. Fortunately Visual C++ provides cross compiling and an ARM DLL can be built on a x86 machine (see #707 for PoC). I managed to compile and build FlatLaf with an ARM DLL, but even in this version, the embedded menu bar does not work right away (try building & running flatlaf-demo if you need a repro) - not quite sure what the cause of this would be though. |
@syoon2 thanks for working on this issue 👍 You need to modify these lines:
and
and FlatLaf/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatWindowsNativeWindowBorder.java Line 92 in b47ed94
BTW please do no commit the ARM DLL to git. I'll do this when merging. I need to digitally sign the DLL. |
@DevCharly Yep, #707 is now updated with the edits to the lines you mentioned and ready for review :-) |
, PR #707) built by GitHub Actions: https://github.com/JFormDesigner/FlatLaf/actions/runs/5771160235 locally signed Windows DLLs with FormDev Software GmbH code signing certificate
Merged in latest Could you please test this build and let me know whether it works? Thanks. |
Just tested with my Surface Pro X - seems to work as expected :) |
I just tested a Java Swing application with the FlatLaf on Windows 11 ARM 64-bit and I got the following error:
So the question is can I ignore this? There seems to be no DLL available for this platform. Is this planned?
The text was updated successfully, but these errors were encountered: