Following the stack trace of the above error, I found the following:
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3223)
This due to the line:
GridPane root = (GridPane) FXMLLoader.load(getClass().getResource("ChatterServer.fxml"));
but the file "ChatterServer.fxml" wasn't at the expected location, which is where the application.class files are.
I'm using the eclipse environment, so this is the /bin folder. Moving a copy of the fxml file to this location fixed this issue.
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3223)
This due to the line:
GridPane root = (GridPane) FXMLLoader.load(getClass().getResource("ChatterServer.fxml"));
but the file "ChatterServer.fxml" wasn't at the expected location, which is where the application.class files are.
I'm using the eclipse environment, so this is the /bin folder. Moving a copy of the fxml file to this location fixed this issue.
No comments:
Post a Comment