Here is my structure:
- com /MyCompany/ValueReader.class
- com / MyCompany / resources / values.xml
I can read the file in my Eclipse project, but when I export it to .jar, it can never find the values.xml.
I tried using ValueReader.class.getResource () and ValueReader.class.getResourceAsStream (), but it does not work.
What is the problem? How to get a file object into my .xml values?
IN.
java xml file jar package
BT
source share