无法生成JavaFX Maven项目
我已经安装了无法生成JavaFX Maven项目,java,maven,java-8,openjfx,Java,Maven,Java 8,Openjfx,我已经安装了openjdk-8和openjfx,但我仍然无法构建任何包含JavaFX元素的Maven项目。Netbeans linting没有显示任何错误,但当我单击“Build Project”时,输出显示: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project javafx: Command execution failed. Process exited
openjdk-8
和openjfx
,但我仍然无法构建任何包含JavaFX元素的Maven项目。Netbeans linting没有显示任何错误,但当我单击“Build Project”时,输出显示:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project javafx: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
谢谢你的建议
编辑:附加pom文件:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>javafx</groupId>
<artifactId>javafx</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
和nbactions.xml:请阅读以下内容:如果它对您没有帮助,请与您共享pom文件我已经阅读了这个问题,但它对我没有帮助。我附加了我的pom文件,但它非常简单。请按照构建输出的说明执行-在启用调试输出的情况下运行(并附加到问题)。同样有趣的是netbeans打印的初始输出,它显示了cmd行上的内容。问题的根源可能是nbactions.xml文件中的nbactions.xml文件的内容以及附带的调试输出,以及nbactions.xml文件中的nbactions.xml。一个人不能同时拥有-jar和-classpath。请阅读:如果这对你没有帮助,请与你分享pom文件。我已经阅读了这个问题,但它对我没有帮助。我附加了我的pom文件,但它非常简单。请按照构建输出的说明执行-在启用调试输出的情况下运行(并附加到问题)。同样有趣的是netbeans打印的初始输出,它显示了cmd行上的内容。问题的根源可能是nbactions.xml文件中的nbactions.xml文件的内容以及附带的调试输出,以及nbactions.xml文件中的nbactions.xml。不能同时拥有-jar和-classpath。
--- exec-maven-plugin:1.2.1:exec (default-cli) @ javafx ---
Exception in thread "main" 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 sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkApplication._isDisplayValid()Z
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
... 5 more