Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+13 votes

Are you getting annoyed by the red warning messages when you run your JavaFX project?

WARNING: Loading FXML document with JavaFX API of version 20.0.1 by JavaFX runtime of version 20.0.0
asked in CSC305 Fall 2023 by (3.5k points)

1 Answer

+6 votes

The issue is that SceneBuilder is saving FXML files using version 20.0.1, but your project is only installing version 20.0 from the maven repositories.

However, good news! It turns out you can get JavaFX version 20.0.01 from the maven repositories. You just need to edit your pom.xml to update the dependencies for JavaFX to 20.0.1, like this:

<dependencies>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>20.0.1</version>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-fxml</artifactId>
        <version>20.0.1</version>
    </dependency>
</dependencies>
answered by (3.5k points)
...