How to set preferred version in Scene Builder?

Viewed 2405

There is an issue I'm facing with Scene Builder where it keeps overwriting the JavaFX version to 15.0.1 whereas I am using version 11.0.2, so I get this warning when running:

WARNING: Loading FXML document with JavaFX API of version 15.0.1 by JavaFX runtime of version 11.0.2

I just edit the version number in the .fxml file:

<Pane maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="293.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1">

But when I make any changes in Scene Builder, it puts it back to 15.0.1 and I get the warning.

How can I fix this?

1 Answers

Since SceneBuilder takes: System.getProperty("javafx.version") as check for its namespace. Maybe try to set this to desired version.

Edit: Open configuration file where your ScenBuilder is installed: e.g.:

C:\Program Files\SceneBuilder\app\SceneBuilder.cfg

Inside under [JavaOptions] add:

java-options=-Djavafx.version=null

You can set it to your current version, but if it is set to NULL it wont check versions or put warning even you open FXML file in SceneBuilder with other version of JavaFX.

Related