Skip to content
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

Improve Windows 64-bit detection #196

Open
Pyker opened this issue Aug 6, 2021 · 4 comments
Open

Improve Windows 64-bit detection #196

Pyker opened this issue Aug 6, 2021 · 4 comments
Assignees
Labels

Comments

@Pyker
Copy link
Member

Pyker commented Aug 6, 2021

No description provided.

@Pyker Pyker self-assigned this Aug 6, 2021
@github-actions
Copy link

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

@github-actions github-actions bot added the stale Inactive issue label Aug 26, 2023
@Pyker Pyker removed the stale Inactive issue label Aug 26, 2023
@1fxe
Copy link

1fxe commented Sep 12, 2023

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"

@Pyker
Copy link
Member Author

Pyker commented Sep 12, 2023

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

@1fxe
Copy link

1fxe commented Sep 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants