I have created a Jar library which its initialization, capabilities, features, etc. should be customized. The problem is that I want this customization to be performed using an external XML file, so the Jar library reads that file and initializes accordingly. The scenario is the following:
I have a Java application which contains the Jar library and the config.xml file. How do I make the Jar library to read the config.xml file? An image for a better understanding:
Diagram http://imageshack.us/a/img826/1888/readxmlfromjar.png
I have been searching for hours but all I find is how to read files within the same jar file with the resources approach. Can this be done at all? If not, any good alternative out there?
You can use zip utils from java.util.zip package http://docs.oracle.com/javase/6/docs/api/java/util/zip/package-summary.html
Like here Read a file inside a Zip archive and put its content into a String in Android