简体   繁体   English

如何在我的 build.gradle 文件中找到要实现的 JavaFX 的最新版本?

[英]How do I find the most recent version of JavaFX to implement in my build.gradle file?

What I believe is the official website, openjfx.io , tells me to use version 0.0.10 in gradle.我相信官方网站openjfx.io告诉我在 gradle 中使用 0.0.10 版本。 However, It's incompatible with JDK 8 and 17, spitting out java.lang.UnsupportedClassVersionError: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 I looked through the JavaFX repo, but couldnt find a good version number to replace 0.0.10 with, but I don't think 0.0.10 is really the most recent one. However, It's incompatible with JDK 8 and 17, spitting out java.lang.UnsupportedClassVersionError: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0我查看了 JavaFX 存储库,但找不到一个好的版本号来替换 0.0.10,但我不认为 0.0.10 真的是最新的。 Where can I find the most recent build number?在哪里可以找到最新的内部版本号?

I don't know where you got 0.0.10, that is not correct.我不知道你从哪里得到 0.0.10,这是不正确的。

See the Products Roadmap at GluonHQ.com.请参阅 GluonHQ.com 上的产品路线图 You will see that 17.0.1 is currently the latest, with 18 in early-access.您将看到 17.0.1 当前是最新版本,其中 18 个处于抢先体验阶段。

The JavaFX (OpenJFX) releases have been synced to arrive at about the same time as the Java releases, and use the same major version number. JavaFX (OpenJFX) 版本已同步到与 Java 版本大致相同的时间,并使用相同的主要版本号。 A convenient approach.一种方便的方法。

But OpenJFX releases do not require the latest Java.但 OpenJFX 版本不需要最新的 Java。 The Release Notes for 17 says it requires Java 11 or later. 17 的发行说明说它需要 Java 11 或更高版本。

I suggest you generally do your development work with the latest Java and the latest JavaFX while aiming your deployments at the latest Long-Term Support (LTS) version of both.我建议您通常使用最新的 Java 和最新的 JavaFX 进行开发工作,同时针对两者的最新长期支持 (LTS) 版本进行部署。 Note that Oracle recently announced a change in the LTS cadence from every three years to every two years.请注意,Oracle 最近宣布将 LTS 节奏从每三年更改为每两年。 Presumably JavaFX will follow that as well.大概 JavaFX 也会遵循这一点。

See also the related Question, Which version of OpenJFX (JavaFX) and Scene Builder should I use with Amazon Corretto 11 (OpenJDK)?另请参阅相关问题,我应该将哪个版本的 OpenJFX (JavaFX) 和 Scene Builder 与 Amazon Corretto 11 (OpenJDK) 一起使用? . .

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

相关问题 我如何修复我的 build.gradle 文件中的依赖项 - How do i fix my dependencies in my build.gradle file 如何在 build.gradle 文件中导入 java class - how do I import java class in build.gradle file 如何在 build.gradle 文件上实现 intelliJ 插件操作? - How can I implement a n intelliJ plugin action on a build.gradle file? 如何在apply from:文件中的build.gradle外部的gradle中导入类 - How do I import a class in gradle outside of build.gradle in a apply from: file 如何在createStartScripts任务中更改unixStartScriptGenerator.template,以便distTar在build.gradle中使用我的自定义模板文件? - How do I change unixStartScriptGenerator.template in the createStartScripts task so that distTar uses my custom template file in build.gradle? 如何从 build.gradle 文件运行 WSDLToJava? - How can I run WSDLToJava from a build.gradle file? Maven:如何使用build.gradle文件? - Maven: How to use a build.gradle file? 如何以编程方式修改build.gradle文件? - How to modify build.gradle file programmatically? 如何在java中解析build.gradle文件? - How to parse a build.gradle file in java? 如果每个人都说如果版本显式位于build.gradle,则应在我的源代码控制中包括gradlew? - Why everyone says I should include gradlew in my source control if its version is explicitly on build.gradle?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM