How to handle java apps lacking ARM support using java SDK on M1 Mac?

The issue here is that you are calling a C library via jogamp The C library provided (I think OpenGL) is Intel only.

Oracle's JDK and JRE are not universal (see the downloads page) i.e. they only do one architecture. Similarly the OpenJDKs are not universal.

Thus to run on ARM and Intel you need two different JREs

Pure Java code should run on any operating system (Linux, Solaris, Windows, macOS and others) and on any architecture e.g. Intel, Arm, SPARC. So you only need one jar for all.

The C code could be built universal and your app could be packaged to include both JREs and the launcher (i.e. executable file given in Info.plist) works out from the architecture which JRE to call)

Java 8 worked as it is Intel and so the whole process ran under Rosetta


If you install the ARM JDK and find it breaks some app using e.g. gluegen, the simplest solution is to install the Intel JDK.

In particular, if you installed the ARM JDK to the default location using the disk image from Oracle's site, you can do precisely the same thing with the Intel JDK. This will effectively overwrite the ARM JDK.

Don't try simply installing the (Intel) JRE on top of the mess. That does NOT work - the JRE built-into the ARM JDK somehow persists. (And following Oracle's instructions for deleting Java before re-installing the JRE won't help either.)

According to Oracle's site, it's possible in theory to install multiple JDK's each in their own location, and switch between them. That would probably also work, but I haven't tried it.