且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

编译javaFx程序时FXMLLoader错误/警告,虽然程序运行正常

更新时间:2022-02-14 00:05:38

我想,你使用Scene Builder工具创建了一个FXML文件。
当场景构建器创建FXML文件时,根有一个属性: xmlns url,其版本为JDK。

I guess ,you created an FXML file using the Scene Builder tool. When scene builder creates an FXML file ,the root has a an attribut :xmlns url which has the version of JDK.

示例

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

出现此警告是因为您使用以下命令加载FXML文件:

And this warning happens because you load an FXML file using :


xmlns =http://javafx.com/javafx/8.0.131

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

但是在您的项目中,您有一个 JDK 8.0.72 ,这意味着您应该将JDK更新到8.0.131或更高版本。

But in your project you have a JDK 8.0.72,which means you should update your JDK to 8.0.131 or more that version.