📜  缺少 JavaFX 运行时组件,并且是运行此应用程序所必需的 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:24.095000             🧑  作者: Mango

代码示例1
To solve the issue, click on Run -> Run Configurations...  -> Java Application, create a new launch configuration for your project and add these VM arguments: 

Windows
--module-path "\path\to\javafx-sdk-15.0.1\lib" --add-modules javafx.controls,javafx.fxml

Linux/Mac
--module-path /path/to/javafx-sdk-15.0.1/lib --add-modules javafx.controls,javafx.fxml