Wednesday, August 21, 2013

read a resource inisde a jar

In both examples the file has locate in root of jar file
this.getClass().getClassLoader().getResourceAsStream("file.xml"))
this.getClass().getResourceAsStream("/file.xml"))



this.getClass().getClassLoader().getResource("file.xml").getFile())

No comments:

Post a Comment