简体   繁体   English

Java OpenJDK 中缺少 JavaFX

[英]JavaFX is missing in Java OpenJDK

I want to make an application that uses a JavaFX GUI.我想制作一个使用 JavaFX GUI 的应用程序。 I've read in a Stack Overflow post that the packages are supposed to be integrated in the OpenJDK ( JavaFX and OpenJDK ).我在 Stack Overflow 帖子中读到,这些包应该集成在 OpenJDK 中( JavaFX 和 OpenJDK )。 So I've set up my OpenJDK 13 ( jdk13 download page ) and can't find the packages that I need to import.所以我已经设置了我的 OpenJDK 13( jdk13 下载页面)并且找不到我需要导入的包。 For example: I can't find the javafx.application.Application class.例如:我找不到javafx.application.Application class。

Where is it located?它位于哪里? Do I need to download something else?我需要下载其他东西吗?

Edit:编辑:

It's strange that I have to prove that the link in the comments doesn't fit this problem, when the people who marked this question as a duplicate clearly didn't read that post at all.奇怪的是,我必须证明评论中的链接不适合这个问题,而将这个问题标记为重复的人显然根本没有阅读该帖子。 Furthermore I myself posted this very link in my question.此外,我自己在我的问题中发布了这个链接。 The question provided in the link asks whether JavaFX support is still bad for OpenJDK and if there are Linux distributions that offer JavaFX in OpenJDK.链接中提供的问题询问 JavaFX 支持是否仍然对 OpenJDK 不利,以及是否有 Linux 发行版在 OpenJDK 中提供 JavaFX。 The accepted answer in that question just compares the two versions of JavaFX in JDK and OpenJDK - an expected answer to the question.该问题中接受的答案只是比较了 JDK 和 OpenJDK 中 JavaFX 的两个版本——这是该问题的预期答案。

I in my question explain specifically what I expected, because I used JavaFX with normal JDK before.我在我的问题中具体解释了我的预期,因为我之前使用了 JavaFX 和普通的 JDK。 Since this is not the case with OpenJDK, I ask how to set it up properly.由于 OpenJDK 不是这种情况,我问如何正确设置它。 So please, if you mark something as duplicate to get your reputaiton - show me exactly where the answer is and don't post a lazy link.因此,如果您将某些内容标记为重复以获得您的声誉,请告诉我答案的确切位置,并且不要发布懒惰的链接。

I myself found the answer already and would post it, if this post gets unlocked...我自己已经找到答案并将发布它,如果这篇文章被解锁......

JavaFX is not part of OpenJDK anymore. JavaFX 不再是 OpenJDK的一部分。 There exist some versions that integrate JavaFX (ie Liberica ).存在一些集成 JavaFX 的版本(即Liberica )。 Or you can reference the OpenJFX builds at Mavencentral in your build script.或者,您可以在构建脚本中引用Mavencentral的 OpenJFX 构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM