Before I explain my problem - I\'ve tried to find solution in already asked questions, but none of them worked ;)
I\'m trying to read file inside jar, which is a depende
If you want to read a file from inside a jar file, maybe the next line works better:
InputStream in = this.getClass().getResourceAsStream("/driver/filename.txt");
After this you will need to convert the InputStream in to a String. I've used Apache commons IOUtils:
String theString = IOUtils.toString(inputStream, encoding);
I hope it helps...
Use target jar classloader like this
ClassInOtherJar.class.getClassLoader().getResourceAsStream("filename.xml")