Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX FXML API version warning

Tags:

java

javafx

fxml

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

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

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.

The root node of the FXML does have the attribute

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

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)?

Edit:
Running the code James_D suggested gives the following results:

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

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

like image 347
Itai Avatar asked Feb 04 '16 19:02

Itai


People also ask

Can you use JavaFX without FXML?

You don't have to use FXML or SceneBuilder. You can simply create the objects yourself and add them to your Scene/Stage yourself. It's entirely open as to how you implement it.

Is JavaFX library or API?

JavaFX is a Java library that consists of classes and interfaces that are written in native Java code. The APIs are designed to be a friendly alternative to Java Virtual Machine (Java VM) languages, such as JRuby and Scala. FXML and Scene Builder.

What is the latest JavaFX version?

JavaFX 11.0.2 is the latest public release of JavaFX 11.


1 Answers

If you use the form:

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.

like image 114
sproketboy Avatar answered Oct 03 '22 23:10

sproketboy