Exception in Application start method java.lang.reflect.InvocationTargetException

For anyone who has this exact same problem in the future, as James_D and the other answer contributors mentioned, removing the “/” at the beginning of the path fixes the problem so use

FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindowView.fxml"));

instead of

FXMLLoader loader = new FXMLLoader(Main.class.getResource("/MainWindowView.fxml"));

Leave a Comment