我正在构建一个简单的Java FX应用程序,它可以在eclipse中正常工作,但是只要我将它导出到jar形式,就无法加载Root Layout:/ 代码:
// Load root layout from fxml file.
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("../../../../../resources/de/mattech/finance/fxml/RootLayout.fxml"));
rootLayout = (BorderPane) loader.load();
// Show the scene containing the root layout.
Scene scene = new Scene(rootLayout);
primaryStage.setScene(scene);