B4J Question Get OS name, version and architecture on a Mac (x64 or arm64)


Active Member
Licensed User
Longtime User

I'm using the following commands to get OS name, version and architecture:
GetSystemProperty("os.name", "")
GetSystemProperty("os.version", "")
GetSystemProperty("os.arch", "")

I've build a Mac application using MacSigner and I have the following issue. No matter on what Mac I'm running it, the result is the same:
OS name: Mac OS X
OS version: 10.16
OS arch: x86_64

Tried on a Mac Mini with M2, OS Ventura 13.2.1 and a Mac Mini (Late 2014) with i5, OS Monterey 12.6.3.

It may be 10.16 the OS version and architecture on which MacSigner was created?

If I'm running the jar file directly, using openjdk 17.0.6 and latest openjfx 19, I get a correct result (ex. for the M2 Mac Mini):
OS name: Mac OS X
OS version: 13.2.1
OS arch: aarch64

The issue appear even with the linked package (running run.command).

If I'm running MacSigner with jdk19 and javafx19, the OS version is correct, but the OS arch is shown as x86_64, I suppose because this is the architecture of the application, not of the OS.

Thank you.
Last edited: