Friday, May 22, 2020

Java: To read file from JAR file classpath

if the *.xml file and .config or even some other file are located in different jars, make sure you use

resource.getInputStream()

NOT

resource.getFile()

when you are loading a file from inside a jar.