OpenJDK-17.0.2带Javafx在Termux中
您好,我安装了OpenJDK-17.0.2 在Termux中,我想制作一个Javafx应用程序,我开始为Java 17.0.2找到Javafx的SDK,但我一无所获。任何人都可以告诉我如何为OpenJDK 17.0.2安装Javafx。或者如何在Termux中安装Java 18.0.1,因为可以选择下载Java的Javafx SDK 18.0.1,但不能下载Java 17.0.2。
Hello I installed openjdk-17.0.2
In termux and I want to make a javafx application I start finding the sdk of javafx for java 17.0.2 but I got nothing. Can anybody tell how can I install the javafx for the openjdk 17.0.2. Or how can I install java 18.0.1 in termux because there is a option to download javafx sdk for java 18.0.1 but not for java 17.0.2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了更快地开发和改进,自OpenJDK 11以来,Javafx被排除在Java SE之外,现在被作为一个单独的项目进行管理(请参阅 httpps> htttps ://github.com/openjdk/jfx )。如果您想与Java SE一起使用Javafx,则需要从
但是,由于体系结构不兼容,因此无法在Termux中使用Javafx的官方构建。 Termux的官方软件包github存储库已经有一个软件包请求(请参阅 https:https:// github。 com/termux/termux-packages/essess/10225 ),如果将此软件包构建并添加到termux中,则可以简单地通过
apt aint install install openjfx
安装它并将其在构建中使用。For faster development and improvement, JavaFX was excluded from Java SE since OpenJDK 11, and now managed as a separate project (see https://github.com/openjdk/jfx). If you want to use JavaFX with Java SE, you need to download JavaFX jmods/SDK from https://www.gluonhq.com/products/javafx, and put them in module path / class path when building.
However, the official builds of JavaFX can't be used in Termux because the architecture is incompatible. There is already a package request in Termux's official packages Github repository (see https://github.com/termux/termux-packages/issues/10225), if this package is built and added into Termux, then you can install it simply by
apt install openjfx
and use it in your build.