johan.vos at gluonhq.com
Sun Jan 27 13:41:22 UTC 2019
While looking into https://github.com/javafxports/openjdk-jfx/issues/316 (crash
in webkit when using maven), it became clear that the default way of
starting java applications in maven is not really the recommended way
(supplying module path and modules).
However, mvn exec:java is very widely used to launch Java applications, and
I'm thinking a warning mechanism might be appropriate.
If you use the regular Java launcher that is part of OpenJDK, an error will
be reported if you try to launch the JavaFX framework while the
java.graphics module is not found .
Maven bypasses this launchers (that is, the JDK launcher only complains
when the main class extends Application, and the maven main class does not
extend Application) but this can lead to problems later at runtime.
We could do a check on modularity during javafx platform initialisation,
but this will of course break all applications that currently bypass the
Java launcher and I'm not sure how widely those are used.
More information about the openjfx-dev