下面是异常输出。我认为该程序无法检索FXML文件“home.FXML”;它在这条线上失败:JavaFX可执行文件JAR遇到加载FXML文件的问题,为什么不加载FXML?
Parent root = FXMLLoader.load(getClass().getResource("/fxml/home.fxml"));
这是加载FXML的类的其余部分。
public class Boorus extends Application{
public static void main(String[] args){
launch(args);
}
public void start(Stage primaryStage) throws Exception{
SQLboss.makeTables();
Parent root = FXMLLoader.load(getClass().getResource("/fxml/home.fxml"));
Scene scene = new Scene(root);
primaryStage.setScene(scene);
primaryStage.setTitle("Boorus");
primaryStage.show();
}
}
我的项目结构看起来如右图所示:
Pastebinned异常这里:http://pastebin.com/rWkRuury