问题
Running the JavaFX project with the run
function in Gradle works fine,
but using the jpackage
function in Gradle does not work properly.
An error occurs while executing the jpackage
function:
12:56:41 AM: Executing task 'jpackage'...
> Configure project :
Project : => 'hellofx' Java module
> Task :compileJava
> Task :processResources
> Task :classes
> Task :jar
> Task :prepareMergedJarsDir
> Task :createMergedModule
> Task :createDelegatingModules
> Task :prepareModulesDir
> Task :jlink
The module name specified in 'application.mainModule' (null) has not the expected value (hellofx).
> Task :jpackageImage
The module name specified in 'application.mainModule' (null) has not the expected value (hellofx).
WARNING: Using incubator modules: jdk.incubator.jpackage
> Task :jpackage
The module name specified in 'application.mainModule' (null) has not the expected value (hellofx).
WARNING: Using incubator modules: jdk.incubator.jpackage
WARNING: Using incubator modules: jdk.incubator.jpackage
BUILD SUCCESSFUL in 1m 41s
10 actionable tasks: 10 executed
12:58:23 AM: Task execution finished 'jpackage'.
JavaFX Gradle project repository: https://github.com/AlexNature1/JavaFXGradle
来源:https://stackoverflow.com/questions/63106837/the-module-name-specified-in-application-mainmodule-null-has-not-the-expecte