当我尝试打开新窗口时,它在netbeans ide上工作正常,但是它在构建的jar上运行,也没有抛出异常 这是我的代码
FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource("/gui/journal/AddToJournalElement.fxml"));
AnchorPane panel = loader.load();
AddToJournalElementController windowController = loader.<AddToJournalElementController>getController();
windowController.init(journalElementsTableView, journal);
Scene secondScene = new Scene(panel);
Stage newWindow = new Stage();
newWindow.setTitle("Ajouter");
newWindow.setScene(secondScene);
newWindow.initModality(Modality.WINDOW_MODAL);
newWindow.initOwner(MainWindow.primary);
newWindow.setWidth(600);
newWindow.setHeight(560);
newWindow.setResizable(false);
newWindow.show();