对于将来遇到同样问题的人,如James_D和其他答案提供者所述,在路径开头删除“ /”可解决问题,因此请使用
FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindowView.fxml"));代替
FXMLLoader loader = new FXMLLoader(Main.class.getResource("/MainWindowView.fxml"));
对于将来遇到同样问题的人,如James_D和其他答案提供者所述,在路径开头删除“ /”可解决问题,因此请使用
FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindowView.fxml"));代替
FXMLLoader loader = new FXMLLoader(Main.class.getResource("/MainWindowView.fxml"));上一篇 如何从Android Studio中的库模块调用活动
下一篇 java.lang.IllegalStateException:Bean名称“category”的BindingResult和普通目标对象都不能用作请求属性