You need to configure the javaFX environment before using it We use JavaFx 21 Steps run- configuration - add VM(virtual machine options) - add command as follow --module-path C:\Project-PIIA\javafx-sdk-21.0.2\lib --add-modules javafx.controls,javafx.fxml,javafx.web remember to change the path into yours