Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
733 views
in Technique[技术] by (71.8m points)

javafx - How to set preferred version in Scene Builder?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 FilesSceneBuilderappSceneBuilder.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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...