In my application from main controller i try to open new scene
public void runReportParserWindow() throws IOException {
System.out.println("Open report parser window");
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setLocation(getClass().getResource("../views/reportWindow.fxml"));
ControllerReportParser controller = new ControllerReportParser(getPrimaryStage(), getMainApp());
controller.registerObserver(this);
fxmlLoader.setController(controller);
Scene scene = new Scene(fxmlLoader.load());
Stage stage = new Stage();
stage.setTitle("Get data for report");
stage.setScene(scene); //scene
stage.initModality(Modality.WINDOW_MODAL);
stage.initOwner(getPrimaryStage());
stage.show();
}
If i run application in Intellij idea - all window open fine. When i create JAR file (artifacts) i can not open any window except main. The main scene is shown, but other are not.
Settings for artifact
What am i doing wrong?