Because of a Java binary that only works on x86 architectures like this, it seems I need to run the Intel versions of Java on my M2 Macbook using Rosetta.
I tried looking up how to do this, and after trying SDKMAN, and just running the Intel installer from Oracle, nothing seems to work.
Details of what I tried with SDKMAN:
- Making a new terminal app that runs with Rosetta using these instructions.
This works as expected:
~ arch
i386
~ uname -m
x86_64
Edit
.sdkman/etc/config
to addsdkman_rosetta2_compatible=false
(unsure if I should do this)sdk install java 11.0.20-ms
(unsure if Microsoft is the provider I should be using)cat `which java` | file -
But this always shows an arm64 version.
How do I install an intel version of Java?
As Thomas Behr suggested, extracting the Java downloaded as a tar.gz from https://jdk.java.net/archive/ seems to work for installing x86 Java on Apple Silicon. This did not solve my universal library issue, but that is out of scope at this point. Thanks for the help.