IDEA莫名其妙报java.io.FileNotFoundException: XXX.xml (系统找不到指定的路径。)错误
IDEA代码前几天还能运行的,结果再运行的时候突然报java.io.FileNotFoundException: XXX.xml (系统找不到指定的路径。)错误
解决方法:
原读取file文件的方法:
File file = new File("XXX.xml");
改为:
ClassLoader classLoader=getClass().getClassLoader();
URL...
原创
2019-11-29 22:26:00 ·
2886 阅读 ·
1 评论