将
Parent root = FXMLLoader.load(getClass().getResource("xml/MainUI.fxml"));
改为:
 Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("xml/MainUI.fxml"));

 

posted on 2019-06-20 17:21  肖建锋  阅读(1215)  评论(1编辑  收藏  举报