java 讀取jar包中的文件

傳統的 new File(path)是會報空指針的。java

能夠用指針

InputStream fis=XXX.class.getResourceAsStream(path);

代替 new File(path) 方法。code

相關文章
相關標籤/搜索