LauncherV3 icon indicating copy to clipboard operation
LauncherV3 copied to clipboard

Improve Windows 64-bit detection

Open Pyker opened this issue 3 years ago • 4 comments

Pyker avatar Aug 06 '21 00:08 Pyker

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Aug 26 '23 01:08 github-actions[bot]

You can check for sun.arch.data.model which is commonly defined and then fall back to "os.arch" if its not there. Relevant doc: https://docs.oracle.com/javame/config/cdc/cdc-opt-impl/ojmeec/1.1/architecture/html/properties.htm Platform word size. Examples: "32", "64", "unknown"

jshell> System.getProperty("sun.arch.data.model")
$1 ==> "64"

1fxe avatar Sep 12 '23 19:09 1fxe

sun.arch.data.model will only give you what bitness the JRE is, which is exactly the problem.

Pyker avatar Sep 12 '23 20:09 Pyker

Ah I see, in that case maybe JNI, JNA but even then its kind of overkill

1fxe avatar Sep 12 '23 22:09 1fxe