[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    mvn exec:java
From:       Johan Vos <johan.vos () gluonhq ! com>
Date:       2019-01-27 13:41:22
Message-ID: CABxFH2G+RvzgSjdmQvEgqA5deXRt5SU8ONdYYfveDM+PyKSpig () mail ! gmail ! com
[Download RAW message or body]

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 [1].

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.

- Johan

[1]
http://hg.openjdk.java.net/jdk/jdk/file/a772e65727c5/src/java.base/share/classes/sun/launcher/LauncherHelper.java#l997



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic