JavaFX FXML API版本警告 [英] JavaFX FXML API version warning

查看:2687
本文介绍了JavaFX FXML API版本警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在启动JavaFX应用程序时注意到以下警告:

I have recently started noticing the following warning when starting my JavaFX application:


警告:使用版本8.0的JavaFX API加载FXML文档.65由JavaFX运行时版本8.0.60

WARNING: Loading FXML document with JavaFX API of version 8.0.65 by JavaFX runtime of version 8.0.60

有问题的FXML是由Gluon Scene Builder 8.1.0创建的,与它一起运行捆绑的Java,版本1.8.0_65。该应用程序是使用我的OS Java 1.8.0_72版启动的。

The FXML in question was created by Gluon Scene Builder 8.1.0, running with it's bundled Java, version 1.8.0_65. The application is launched with my OS Java, version 1.8.0_72.

FXML的根节点确实具有属性

The root node of the FXML does have the attribute

xmlns="http://javafx.com/javafx/8.0.65"

但我认为是1.8。 0_72> 1.8.0_65,为什么我收到此消息?
这是我应该担心的吗?有没有办法问jre什么是JavaFX API版本(显然,它与Java版本不同)?

but I figured 1.8.0_72 > 1.8.0_65, so why am I getting this message? Is it something I should be worried about? And is there a way to ask the jre what is the JavaFX API version (which, apparently, is not the same as the Java version)?

编辑:

运行代码James_D建议给出以下结果:


Running the code James_D suggested gives the following results:


java版本:1.8.0_72-internal

javafx.version:8.0.60

java version: 1.8.0_72-internal
javafx.version: 8.0.60

那么,看起来JDK中的JavaFX版本是错误的?或者我可能有一个旧的jfxrt.jar?我会调查一下。

So, looks like the JavaFX version in the JDK is wrong? Or maybe I have an old jfxrt.jar? I'll look into that.

推荐答案

如果您使用表格:

xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"

版本控制被忽略。如果您与其他版本存在兼容性问题,则只需要它。

The versioning is ignored. You'd only need it if you had some compatibility issue with another version.

这篇关于JavaFX FXML API版本警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆