How to reference javafx fxml files in resource folder?
问题 I am creating a javafx GUI application and my project is a maven configured project. I want to be able to reference my fxml files like this in my controllers: FXMLLoader.load(getClass().getResource(\"main.fxml\"); Where my main.fxml file is located in the src/main/resources folder and my controller is in the src/main/java folder. How do i go about doing this? My src/main/resources folder is in the build path and i am able to call a .properties file that is in the src/main/resources folder