The plugin seems to rework the arguments of the java executable invoked to run the program when Gradle's run task is used.
What happens is that a few arguments meant for the java program are actually moved after the --module option and therefore end up forwarded as arguments to the program being run.
If the program does any sort of CLI argument parsing, it will fail with some form of "Unrecognized option: <some java option>".
When I run a simple modular application using ./gradlew --debug run I get this (excerpt):
The -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant --module com.example.javamodfx/com.example.javamodfx.App arguments are added after the first --module option.
The plugin seems to rework the arguments of the
java
executable invoked to run the program when Gradle'srun
task is used.What happens is that a few arguments meant for the
java
program are actually moved after the--module
option and therefore end up forwarded as arguments to the program being run.If the program does any sort of CLI argument parsing, it will fail with some form of "Unrecognized option: <some java option>".
When I run a simple modular application using
./gradlew --debug run
I get this (excerpt):The
-Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant --module com.example.javamodfx/com.example.javamodfx.App
arguments are added after the first--module
option.The example project with more information is available here: https://github.com/acisternino/javafx-plugin-bug
java
command manual page: https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.htmlTested with 0.0.11-SNAPSHOT.