Skip to content

Commit

Permalink
Provide a method to check if the current operating system architectur…
Browse files Browse the repository at this point in the history
…e is `aarch64`
  • Loading branch information
besidev committed Mar 19, 2024
1 parent 48a4dca commit 3b184ff
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class PlatformUtils {

private static final String os = System.getProperty("os.name");
private static final String version = System.getProperty("os.version");
private static final String arch = System.getProperty("os.arch");
private static final String javafxPlatform = System.getProperty("javafx.platform");
private static final boolean embedded = Boolean.getBoolean("com.sun.javafx.isEmbedded");
private static final boolean ANDROID = "android".equals(javafxPlatform) || "Dalvik".equals(System.getProperty("java.vm.name"));
Expand Down Expand Up @@ -80,6 +81,15 @@ public static boolean isIOS(){
return IOS;
}

/**
* Returns true if the operating system architecture is arm64 (aarch64).
*
* @return <code>true</code> if the operating system architecture is arm64, <code>false</code> otherwise.
*/
public static boolean isAarch64() {
return arch.equals("aarch64");
}

/**
* Utility method used to determine whether the version number as
* reported by system properties is greater than or equal to a given
Expand Down

0 comments on commit 3b184ff

Please sign in to comment.