javapackager - partially self-contained apps in JDK 9

Alan Snyder javalists at cbfiddle.com
Tue Apr 11 17:43:38 UTC 2017


I have run into a problem in moving my macOS apps from JDK 8 to 9. The issue relates to using MySQL via JDBC.
The connector class name is fixed. The class is loaded using Class.forName(). However, there can be different versions
of the connector in different JAR files, and the proper version might need to be synced with the currently installed version
of MySQL.

In JDK 8, I used the extension mechanism to load the MySQL connector JAR rather than building this JAR into the bundled app.
My thinking was that the connector might need to be updated in sync with the database and I should not have to rebuild apps to do that.

In JDK 9, the extension mechanism is gone. I have not found any way to achieve the equivalent effect. It seems that javapackager
controls the setting of the CLASSPATH. I have not found an option that would allow me to extend the CLASSPATH with a directory
where the connector JAR could be found. Is there a way to do this?

  Alan



More information about the openjfx-dev mailing list