Ken17
Ken17

Reputation: 1

Warning FXML eclipse

I would like to ask you why the java compiler gives me the following warning:

"Loading FXML document with JavaFX API of version 10.0.1 by JavaFX runtime of version 8.0.151"

and how do I avoid it?

Upvotes: 0

Views: 132

Answers (1)

Zephyr
Zephyr

Reputation: 10253

Simply put, the error is warning you are loading an "FXML document with JavaFX API of version 10.0.1 by JavaFX runtime of version 8.0.151". :)

So, if you used Scene Builder to generate the FXML document, you used a version of made for Java 10. But your JDK is for Java 8.

This is generally not a massive issue as the FXML specifications have not changed much between version. But if, in the future, the FXML API is changes, Java 8 would not be aware of the changes and could cause issues.


In the meantime, you can avoid the warning by changing your FXML file's root element and removing the following property:

xmlns="http://javafx.com/javafx/10.0.1" (or however yours is defined).

Upvotes: 1

Related Questions