[英]How do I make JavaFX work on mac(Visual Studio Code)?
So I tried making a JavaFX application on my Mac, and I can't figure out what I'm doing wrong.所以我尝试在我的 Mac 上制作 JavaFX 应用程序,但我不知道我做错了什么。 I heard that JavaFX is bundled with JDK.
听说JavaFX是捆绑JDK的。 I am using the latest JDK and Java.
我正在使用最新的 JDK 和 Java。 I use Visual Studio Code.
我使用 Visual Studio 代码。 Sometimes I also use Eclipse.
有时我也使用 Eclipse。 My operating system is macOS Catalina version 10.15.3.
我的操作系统是 macOS Catalina 版本 10.15.3。
So here's the problem: When I try to import JavaFX, it gives me an error.所以这里的问题是:当我尝试导入 JavaFX 时,它给了我一个错误。 The error says: The import JavaFX cannot be resolved Why does this happen and how can I fix this?
错误说:无法解决导入 JavaFX 为什么会发生这种情况,我该如何解决?
JavaFX is NOT bundled with the Java JDK anymore, the JFX library is a separate library that must be downloaded from openjfx.io and linked to your project. JavaFX 不再与 Java JDK 捆绑在一起,JFX 库是一个单独的库,必须从 openjfx.io 下载并链接到您的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.