Cannot compile nor run a JavaFX application

已回答

I have some problems with IntelliJ, version 2017.3

I have no idea why Maven is running "offline".

My JavaFX application doesn't run

Here is the log of Maven build.

0
Information:java: Errors occurred while compiling module 'plants'
Information:javac 9.0.4 was used to compile java sources
Information:14/03/2018 19.21 - Compilation completed with 20 errors and 1 warning in 50s 718ms
C:\Users\Line\IdeaProjects\Plants-2.0\src\java\main\be\manudahmen\growth\App.java
Error:Error:line (19)java: package javafx.application does not exist
Error:Error:line (20)java: package javafx.fxml does not exist
Error:Error:line (21)java: package javafx.scene does not exist
Error:Error:line (22)java: package javafx.scene does not exist
Error:Error:line (23)java: package javafx.stage does not exist
Error:Error:line (27)java: cannot find symbol
symbol: class Application
Error:Error:line (34)java: cannot find symbol
symbol: class Stage
location: class be.manudahmen.growth.App
Error:Error:line (30)java: cannot find symbol
symbol: method launch(java.lang.String[])
location: class be.manudahmen.growth.App
Error:Error:line (33)java: method does not override or implement a method from a supertype
Error:Error:line (35)java: cannot find symbol
symbol: class Parent
location: class be.manudahmen.growth.App
Error:Error:line (37)java: cannot find symbol
symbol: variable FXMLLoader
location: class be.manudahmen.growth.App
Error:Error:line (37)java: cannot find symbol
symbol: method getClass()
location: class be.manudahmen.growth.App
Error:Error:line (42)java: cannot find symbol
symbol: class Scene
location: class be.manudahmen.growth.App
Error:Error:line (42)java: cannot find symbol
symbol: class Scene
location: class be.manudahmen.growth.App
C:\Users\Line\IdeaProjects\Plants-2.0\src\java\main\be\manudahmen\growth\App2.java
Error:Error:line (19)java: package javafx.application does not exist
Error:Error:line (20)java: package javafx.stage does not exist
Error:Error:line (22)java: cannot find symbol
symbol: class Application
Error:Error:line (29)java: cannot find symbol
symbol: class Stage
location: class be.manudahmen.growth.App2
Error:Error:line (25)java: cannot find symbol
symbol: method launch(java.lang.String[])
location: class be.manudahmen.growth.App2
Error:Error:line (28)java: method does not override or implement a method from a supertype
C:\Users\Line\IdeaProjects\Plants-2.0\src\java\main\be\manudahmen\growth\audio\SoundProductionSystem.java
Warning:Warning:line (51)java: be.manudahmen.empty3.BSpline in be.manudahmen.empty3 has been deprecated
C:\Users\Line\IdeaProjects\Plants-2.0\src\java\main\be\manudahmen\growth\TreeData.java
Information:Information:java: C:\Users\Line\IdeaProjects\Plants-2.0\src\java\main\be\manudahmen\growth\TreeData.java uses unchecked or unsafe operations.
Information:Information:java: Recompile with -Xlint:unchecked for details.
0

Hello Manuel,

You could disable offline mode in "Settings | Build... | Build Tools | Maven".

Also please check that all needed dependencies are mentioned under "Dependencies" in Maven Tool Window

 

0

I still have a problem when go online:

"C:\Program Files\Java\jdk-9.0.4\bin\java" -Dmaven.multiModuleProjectDirectory=C:\Users\Line\IdeaProjects\Plants-2.0 "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\lib\idea_rt.jar=54195:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.3.4 --errors --update-snapshots com.zenjava:javafx-maven-plugin:8.8.3:run
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Plants' growth 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:8.8.3:run (default-cli) > :jar @ plant-growth >>>
[INFO]
[INFO] >>> javafx-maven-plugin:8.8.3:jar (jar) > [jfxjar]package @ plant-growth >>>
Downloading: ftp://ftp.manudahmen.be/m2repository/junit/junit/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml
Downloading: http://maven.openimaj.org/junit/junit/maven-metadata.xml
Downloading: http://octopussy.ecs.soton.ac.uk/m2/thirdparty/junit/junit/maven-metadata.xml
Downloading: http://octopussy.ecs.soton.ac.uk/m2/snapshots/junit/junit/maven-metadata.xml
Downloading: http://xuggle.googlecode.com/svn/trunk/repo/share/java/junit/junit/maven-metadata.xml
Downloading: file:///c:/users/line/.m2/junit/junit/maven-metadata.xml
Downloading: https://clojars.org/repo/junit/junit/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml
Downloaded: http://maven.openimaj.org/junit/junit/maven-metadata.xml (2 KB at 3.1 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml (2 KB at 2.5 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml (2 KB at 2.1 KB/sec)
Downloaded: https://clojars.org/repo/junit/junit/maven-metadata.xml (290 B at 0.4 KB/sec)
[WARNING] The POM for be.manudahmen:empty3:jar:64 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for be.manudahmen:jcalculator:jar:1.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources) @ plant-growth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Line\IdeaProjects\Plants-2.0\runscripts
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ plant-growth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Line\IdeaProjects\Plants-2.0\src\main\java
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ plant-growth ---
[INFO] Compiling 1 source file to C:\Users\Line\IdeaProjects\Plants-2.0\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ plant-growth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Line\IdeaProjects\Plants-2.0\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ plant-growth ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ plant-growth ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.0:jar (default-jar) @ plant-growth ---
[INFO] Building jar: C:\Users\Line\IdeaProjects\Plants-2.0\target\plant-growth-1.jar
[INFO]
[INFO] <<< javafx-maven-plugin:8.8.3:jar (jar) < [jfxjar]package @ plant-growth <<<
[INFO]
[INFO] --- javafx-maven-plugin:8.8.3:jar (jar) @ plant-growth ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.532 s
[INFO] Finished at: 2018-03-15T17:20:58+01:00
[INFO] Final Memory: 16M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:8.8.3:jar (jar) on project plant-growth: Execution jar of goal com.zenjava:javafx-maven-plugin:8.8.3:jar failed: Plugin com.zenjava:javafx-maven-plugin:8.8.3 or one of its dependencies could not be resolved: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-9.0.4/../lib/ant-javafx.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.zenjava:javafx-maven-plugin:8.8.3:jar (jar) on project plant-growth: Execution jar of goal com.zenjava:javafx-maven-plugin:8.8.3:jar failed: Plugin com.zenjava:javafx-maven-plugin:8.8.3 or one of its dependencies could not be resolved: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-9.0.4/../lib/ant-javafx.jar
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:352)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:197)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution jar of goal com.zenjava:javafx-maven-plugin:8.8.3:jar failed: Plugin com.zenjava:javafx-maven-plugin:8.8.3 or one of its dependencies could not be resolved: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-9.0.4/../lib/ant-javafx.jar
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 25 more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin com.zenjava:javafx-maven-plugin:8.8.3 or one of its dependencies could not be resolved: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-9.0.4/../lib/ant-javafx.jar
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:218)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:400)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:372)
at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:231)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:102)
... 26 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-9.0.4/../lib/ant-javafx.jar
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:210)
... 31 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-9.0.4/../lib/ant-javafx.jar
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:286)
... 34 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Process finished with exit code 1
0

Seems it's a known issue that maven plugin doesn't support JDK 9: https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues/287

0

I have tried installing JDK 8 but I still got the error.

1) Compilation errors (package doesn't exist with the Idea "builder"

2) Runtime exceptions with Maven.

What should I do?

0

Could you please share your project (or sample project reproducing the issue) for investigation?

0
"C:\Program Files\Java\jdk1.8.0_161\bin\java" -Dmaven.multiModuleProjectDirectory=C:\Users\Line\IdeaProjects\Plants-2.0 "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\lib\idea_rt.jar=50321:C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.3.5 --errors --update-snapshots com.zenjava:javafx-maven-plugin:8.9.0-SNAPSHOT:run
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for be.manudahmen:plant-growth:jar:1
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin com.zenjava:javafx-maven-plugin @ line 361, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
Downloading: https://oss.sonatype.org/content/groups/public/com/zenjava/javafx-maven-plugin/8.9.0-SNAPSHOT/maven-metadata.xml
Downloaded: https://oss.sonatype.org/content/groups/public/com/zenjava/javafx-maven-plugin/8.9.0-SNAPSHOT/maven-metadata.xml (994 B at 0.2 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Plants' growth 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:8.9.0-SNAPSHOT:run (default-cli) > :jar @ plant-growth >>>
[INFO]
[INFO] >>> javafx-maven-plugin:8.9.0-SNAPSHOT:jar (jar) > [jfxjar]package @ plant-growth >>>
Downloading: http://octopussy.ecs.soton.ac.uk/m2/thirdparty/junit/junit/maven-metadata.xml
Downloading: ftp://ftp.manudahmen.be/m2repository/junit/junit/maven-metadata.xml
Downloading: http://maven.openimaj.org/junit/junit/maven-metadata.xml
Downloading: http://octopussy.ecs.soton.ac.uk/m2/snapshots/junit/junit/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml
Downloading: http://xuggle.googlecode.com/svn/trunk/repo/share/java/junit/junit/maven-metadata.xml
Downloading: file:///c:/users/line/.m2/junit/junit/maven-metadata.xml
Downloaded: http://maven.openimaj.org/junit/junit/maven-metadata.xml (2 KB at 3.3 KB/sec)
Downloading: https://clojars.org/repo/junit/junit/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml (2 KB at 5.1 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/junit/junit/maven-metadata.xml (2 KB at 3.5 KB/sec)
Downloaded: https://clojars.org/repo/junit/junit/maven-metadata.xml (290 B at 0.4 KB/sec)
[WARNING] The POM for be.manudahmen:empty3:jar:64 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for be.manudahmen:jcalculator:jar:1.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources) @ plant-growth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Line\IdeaProjects\Plants-2.0\runscripts
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ plant-growth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Line\IdeaProjects\Plants-2.0\src\main\java
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ plant-growth ---
[INFO] Compiling 3 source files to C:\Users\Line\IdeaProjects\Plants-2.0\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ plant-growth ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Line\IdeaProjects\Plants-2.0\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ plant-growth ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ plant-growth ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.0:jar (default-jar) @ plant-growth ---
[INFO] Building jar: C:\Users\Line\IdeaProjects\Plants-2.0\target\plant-growth-1.jar
[INFO]
[INFO] <<< javafx-maven-plugin:8.9.0-SNAPSHOT:jar (jar) < [jfxjar]package @ plant-growth <<<
[INFO]
[INFO] --- javafx-maven-plugin:8.9.0-SNAPSHOT:jar (jar) @ plant-growth ---
[INFO] Building JavaFX JAR for application
[INFO] Adding 'deploy' directory to Mojo classpath: C:\Users\Line\IdeaProjects\Plants-2.0/src/main/deploy
[INFO]
[INFO] <<< javafx-maven-plugin:8.9.0-SNAPSHOT:run (default-cli) < :jar @ plant-growth <<<
[INFO]
[INFO] --- javafx-maven-plugin:8.9.0-SNAPSHOT:run (default-cli) @ plant-growth ---
[INFO] Running JavaFX Application
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at be.manudahmen.growth.App.start(App.java:69)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
... 1 more
Exception running application be.manudahmen.growth.App
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.092 s
[INFO] Finished at: 2018-03-17T10:37:03+01:00
[INFO] Final Memory: 20M/136M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:8.9.0-SNAPSHOT:run (default-cli) on project plant-growth: There was an exception while executing JavaFX Application. Please check build-log. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.zenjava:javafx-maven-plugin:8.9.0-SNAPSHOT:run (default-cli) on project plant-growth: There was an exception while executing JavaFX Application. Please check build-log.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: There was an exception while executing JavaFX Application. Please check build-log.
at com.zenjava.javafx.maven.plugin.RunMojo.execute(RunMojo.java:97)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 21 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1
0

The latest log shows that application was packed successfully, but there was some error at runtime. Please check related discussion: https://stackoverflow.com/questions/20507591/javafx-location-is-required-even-though-it-is-in-the-same-package

0

请先登录再写评论。