For anyone interested in building Java-based macOS universal applications, it 
is possible to create a bundled application that contains two Java runtimes, 
one for x86 and one for arm. A custom launcher is required to select the 
appropriate runtime based on the execution environment. I have created such a 
launcher; it is a very small modification of the macOS launcher used by 
jpackage.

The custom launcher is available on GitHub: 
https://github.com/violetlib/mac-universal-java-launcher

There is some discussion of this issue in JDK-8266259 
[https://bugs.openjdk.org/browse/JDK-8266259].
So far, there does not seem to be much interest in this topic.

On a related note, is there a place where developers using Java on macOS who 
are not associated with OpenJDK can share information?





Reply via email to