Here is my code:
public void start(Stage stage) throws Exception {
DemoView appView = new DemoView();
Scene scene = new Scene(appView.getView());
final String uri = getClass().getResource("app.css").toExternalForm();
scene.getStylesheets().add(uri);
stage.setScene(scene);
stage.setResizable(true);
stage.setTitle("Character Generator");
stage.show();
}
It throws an epic combos of errors like:
Exception in Application start method
java.lang.reflect.InvocationTargetException
What am I doing wrong? The compiler reports me that the code I wrote is the one who needs to be fixed. If I run it with Java 1.8 everything works, but when I compile it and run with Java 17 it crashes. If I try to run it from Java 10 to upper, it neither compiles it, just crashes with this error. The incriminated line should be:
Scene scene = new Scene(appView.getView());