View Single Post
11/05/23, 05:33 AM   #20
Coorbin
AddOn Author - Click to view addons
Join Date: Sep 2018
Posts: 15
Originally Posted by dan_el2 View Post
Did you follow all steps outlined in Post #10 including removing all other versions of Java? (like AdoptOpenJDK/Adoptium, Zulu etc.) - You have to use Oracle's Java Runtime for Minion to work!

I can confirm it's working on Sonoma 14.1 with Oracle's Java 8 Update 391.
OK, I finally figured out what was going on.

It turns out that the JAR file available on Minion's website is extremely out of date, and running it actually hurts compatibility with certain JREs on MacOS. The fully patched, latest version of Minion-jfx.jar has much better (but not perfect) compatibility with recent and open source Java runtimes on MacOS, as long as they have a working copy of JavaFX.

Before, I was using sdkman to manage JRE installs in my home folder and avoid having a system-level JRE, plus I didn't want to have all the Java applet browser extension and self-updater nonsense that Oracle ships.

I still want to run my system without Oracle JRE installed system-wide, so here's what I did:

1. Follow instructions in the previous post (the one you quoted) to install Oracle JRE (grr...), and use it to launch the ancient version of Minion on the website.

2. Minion will start successfully, and ask to patch. Accept the patch/update. This will modify Minion-jfx.jar. As of this writing, the sha256sum of the latest Minion JAR is e0706efb4c039964b6250cdcce6a1cab291d03d8ef270aa1158d22625fe2cca1. If I had a direct download link to this file, we could skip step 1 and 2 entirely, but I didn't bother to get the link yet.

3. Launch the Oracle JRE installer again, and it will give you an option to Remove. Go ahead and get rid of that thing.

4. Go to https://sdkman.io/ and follow instructions to install sdkman in your home folder.

5. Run: sdk install java 11.0.21.fx-librca

The above command will install the "Liberica" OpenJDK build, version 11, with JavaFX built-in, into your home directory in the ~/.sdkman folder. Java 11 is still an older runtime, but it is still an LTS, and much newer than Java 8. Besides, the Liberica Java 8 with JavaFX still doesn't work with the patched Minion for some reason, but Java 11 does.

I already went through the trouble of testing Java 17 and Java 21 (the two newest LTS releases) with patched Minion. They don't work due to some incompatible change in JavaFX. So the newest LTS version supported seems to be Java 11.

When SDKman installs Java, you get an option whether you want to make it your default Java. If you intend to have a newer Java runtime (whether system-wide or from sdkman) as your default, just say "no".

6. If you chose not to make Liberica Java 11 your default Java, run this: sdk use java 11.0.21.fx-librca

This will temporarily make your current shell use Liberica Java 11.

7. Now just run: java -jar Minion-jfx.jar

This will start up Minion and it will work normally without generating any exceptions.

In theory, someone could take the latest version of Minion's JAR, the latest version of the Liberica Java 11 runtime with JavaFX, bundle the two together into an app bundle, and provide a direct download that will just work. Another option would be, if Minion ever works with Java version 17 or later, GraalVM can compile a native Mac binary of Minion (no .jar at all!). But these projects would require additional work.
  Reply With Quote