【发布时间】:2021-04-18 20:40:24
【问题描述】:
我目前正在使用 maven 使用 javafx 做一个项目。当我从 IntelliJ 的运行按钮直接运行它时,它工作正常,但是当我尝试用 Maven 编译它时,我得到了很多像这样的错误:
package javafx.collections does not exist
我的 pom.xml 上有这样的 javafx 依赖项,但看起来 Maven 没有得到它。
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>11</version>
<type>pom</type>
</dependency>
</dependencies>
我错过了什么? 提前谢谢你
【问题讨论】: