There is a lot being asked in your stackoverflow question. It’s not the easiest thing for me to untangle. But I thought I could maybe put in a couple helpful points.
If your program has javafx, the command
java -jar yourprogram.jar
won’t work. You have to include a path to the JavaFX modules.
OpenJDX.io has a good tutorial. This page (subpage: Runtime Images/Modular with CLI) has the syntax.
One thing that threw me at first when I started using OpenJDK 11 with OpenJFX 11, is that the code needs to be able to reach both the javafx.jar files and the javafx modules. Thus, you have to install BOTH the JDK and the jmods from Gluon’s JavaFX download page.
With Eclipse, to develop and be able to run a program with JavaFX, I had to include the SDK files in the Build Path/Libraries/Modulepath. (It is sitting adjacent to the JRE System Library – now OpenJDK 11.)
Also, I have to have the following in Run Configurations/Arguments/VM arguments:
--module-path "c:\Program Files\Java\javafx-jmods-11.0.1" --add-modules=javafx.controls
This is covered in the openjdk.io “Getting Started” tutorial subsection on Eclipse.
I have never used “Export/Java/Runnable JAR file” but have always used “Export/Java/JAR file”, so I can’t help with that.
In fact, at this point, I just export source code and do command-line compiling and jlinking, along a slightly modified version of this tutorial. For Windows, I use InnoSetup5 for the last stage of packaging.
For the Mac, I’m still working out the details of packaging. I got JLINK to work and can run applications on the Mac, but am still trying to get my brain around the steps where one turns the file folder into an .app. I posted earlier today on StackOverflow asking for some help to connect the dots on this.