【问题标题】:Can't get Spring Boot + JavaFX running in Eclipise无法在 Eclipse 中运行 Spring Boot + JavaFX
【发布时间】:2020-02-25 00:03:09
【问题描述】:

我正在尝试根据this tutorial 让 Spring Boot 与 Java FX 一起使用。具体来说,我克隆并尝试运行this project from the tutorial,它应该设置正确。

当我尝试在 Eclipse 中使用 Run as / Spring Boot App 运行项目时,出现以下错误:

Error: JavaFX runtime components are missing, and are required to run this application

我正在运行 JDK 11,并尝试根据教程将 javafx jar 添加到构建路径。我错过了什么吗?

【问题讨论】:

标签: java spring-boot javafx


【解决方案1】:

除了将 JavaFX 库添加到构建路径之外,您还必须编辑运行配置并将 --add-modules javafx.controls,javafx.fxml 添加到 VM 参数中。

根据@jewelsea 的评论再次阅读the official guide 时看到了这一点。

【讨论】:

    猜你喜欢
    • 2020-02-02
    • 2019-01-27
    • 2020-11-08
    • 1970-01-01
    • 2019-07-28
    • 1970-01-01
    • 2014-11-28
    • 2019-04-12
    • 2018-11-28
    相关资源
    最近更新 更多