Building/distributing more than one VM in a single JDK distribution

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Mar 12 11:53:29 UTC 2025


On 2025-03-12 01:31, Alan Snyder wrote:

> A JDK distribution that provided both x86 and arm for macOS would be useful for building universal applications.
>
> It would be particularly good if the class files were shared, as I believe they can be (perhaps with some adjustment).

Supporting universal applications on macOS (that is, a single binary 
combining code for both x64 and aarch64) is a completely different 
question, and (if possible!) even more hairy than the multi-JVM 
solution. Having support for multiple JVMs will not in the slightest 
help any effort to make universal applications on macOS, on the contrary 
it is only likely to make it more complicated (just as it complicates 
any other build changes involving hotspot).

And, just to be clear, supporting universal applications seems in the 
JDK seems extremely unlikely to me. Oracle is not spending any effort on 
doing that, and I don't know about anyone else doing it. I suspect that 
any attempt to do this would be built as a separate layer on top of the 
JDK build, where a x64 and an aarch64 builds are combined. But since not 
even the list of included classes is the same between macOS/x64 and 
macOS/aarch64, this is definitely a non-trivial amount of work.

/Magnus



More information about the jdk-dev mailing list