I have a Maven project and I am trying to work with javafx (I´m using Eclipse) I´m want to change path of my files. I have
Parent root = FXMLLoader.load(getClass().getResource("/application/Main.fxml"));
This works fine with the next folder structure
src
main
java
com
projectFolder
main.java
application
Main.fxml
But I want something like
src
main
java
com
projectFolder
main.java
application
Main.fxml
I have tried Parent root = FXMLLoader.load(getClass().getResource("/com/application/Main.fxml"));
but does not work.
I get the next error
[JavaFX Application Thread] ERROR com.application.Main - javafx.fxml.LoadException:
/C:/Users/user/workspace/git/project/target/classes/com/application/Main.fxml:15
Anyone knows what´s wrong with it?