Thursday, September 12, 2013

Reading Files From JAR - Maven Project

ClassLoader loader = getClass().getClassLoader();
in = loader.getResourceAsStream("templates/"+templateType.getValue()+".xml");


where the template is stored in a maven project as in

Src--> main--> resources-->templates-->template.xml

No comments:

Post a Comment