validate

fun validate(errorMessage: () -> String)(source)

Validates that the current process is not running under Rosetta.

If the current process is running under Rosetta, it (Java in this case) will think it's running x86 but Rosetta leaves a peephole to check if the current process is running as a translated binary.

We do this to ensure that folks are using arm64 JDK builds for native performance.

Peephole: https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment#Determine-Whether-Your-App-Is-Running-as-a-Translated-Binary