传统的 new File(path)是会报空指针的。java
能够用指针
InputStream fis=XXX.class.getResourceAsStream(path);
代替 new File(path) 方法。code