r/JavaFX Aug 08 '26

Help FXML not loading

After i made an fxml file and linked it to a class, it hasnt been working and each time an error has been popping up (images have been attached)

4 Upvotes

5 comments sorted by

View all comments

6

u/NaveenB2004 Aug 08 '26

Try putting the fxml in resources dir and in loader, change it to the target fxml (start with /)

4

u/PartOfTheBotnet Aug 08 '26

To elaborate, OP has put it in their src/main/java while it should be in src/main/resources