傳統的 new File(path)是會報空指針的。java
能夠用指針
InputStream fis=XXX.class.getResourceAsStream(path);
代替 new File(path) 方法。code