小编Sla*_*yer的帖子

错误:缺少 JavaFX 运行时组件,包括 IntelliJ Idea、Maven 和 JDK 19

问题是当我尝试运行我的主类时,我收到上面的错误。我正在使用 Intellij IDEA

在 pom.xml 中添加了依赖项和插件 Ran mvn clean install,还有 mvn clean javafx:ru​​n 但我无法运行我的主类

这是我添加到pom中的内容

<dependency>
  <groupId>org.openjfx</groupId>
  <artifactId>javafx-controls</artifactId>
  <version>19</version>
</dependency>

<dependency>
  <groupId>org.openjfx</groupId>
  <artifactId>javafx-fxml</artifactId>
  <version>19</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
<plugin>
  <groupId>org.openjfx</groupId>
  <artifactId>javafx-maven-plugin</artifactId>
  <version>0.0.8</version>
  <configuration>
    <mainClass>App</mainClass>
  </configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)

javafx intellij-idea maven

4
推荐指数
1
解决办法
2024
查看次数

标签 统计

intellij-idea ×1

javafx ×1

maven ×1