ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource(“file/test.xml”).getFile());
reference: https://www.mkyong.com/java/java-read-a-file-from-resources-folder/
[java] Java – Read a file from resources folder
分類:java