I am using classLoader to load xml files located under /src/XMLS
:
String m_path = "XMLS/file.xml"
ClassLoader cl = getClass.getClassLoader();
file f1 = new file(cl.getResource(m_path).getFile));
Running on windows it works fine but after export to jar and running it on Linux I get FileNotFoundException
- /XMLS/file.xml
.
I had tried this solutions and I dont think that the problem is in the read from the .jar
file. any other ideas for what I am doing wrong?