Serious ClassLoader issues with standard JavaFX packaging.
kevin.rushforth at oracle.com
Thu Jan 9 15:32:03 PST 2014
This may, in fact, be the root cause of
https://javafx-jira.kenai.com/browse/RT-20988 which was resolved for FX
8 when we moved jfxrt.jar into lib/ext so I didn't look into it further.
It is unlikely that we will fix this for an FX 2 release, so can you try
it with FX 8 and see if it works for you (it should since you no longer
need com.javafx.main.Main anymore).
Scott Palmer wrote:
> Has anyone tried using a custom Log Formatter with a JavaFX app, where the
> log formatter was not part of the main application jar?
> We have a class implementing java.util.logging.Formatter that is present in
> a utility Jar. That utility jar is specified on the classpath for our
> JavaFX application using the javafxpackager -createjar command with
> the -classpath option. We can see that the jar is correctly added to the
> JavaFX-Class-Path: entry in the jar's manifest.
> However, the java.utils.logging APIs are not able to load it.
> We then hacked the package.cfg file in the application bundle created by
> javafxpacker -deploy -native to add this jar on the app.classpath= line
> (which was otherwise left blank).
> That fixed the problem.
> Looking more closely at the javafx launcher source code
> (fxpackager/src/main/java/com/javafx/Main.java) I see that a new
> URLClassLoader is created but using 'null' as the parent ClassLoader
> instead of the System ClassLoader or ContectClassLoader.
> Is that intentional?
> Note that this also broke other aspects of our application that dealt with
> loading plugins. I use the logging as an example because it is much
> Our application is compiled and deployed with 7u45.
More information about the openjfx-dev