【发布时间】:2021-01-12 03:35:38
【问题描述】:
这里是 Java 新手。我有一个使用 maven 在 netbeans 上的 java 项目。我正在尝试将 javafx 添加到我的项目中。
我在 pom.xml 文件中添加了以下内容:
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>15</version>
<type>pom</type>
</dependency>
但是当我尝试在 netbeans 中构建我的项目时,我收到了这个错误(tsInfluence 是包含试图调用 jfx 的主要方法的类):
Error: LinkageError occurred while loading main class com.ts.tsInfluence.tsInfluence
java.lang.ClassFormatError: Invalid superclass index 0 in class file com/ts/tsInfluence/tsInfluence
Command execution failed.
【问题讨论】:
标签: java javafx netbeans-platform