I have a project having the following folder:
resources/xml-schemata/someXMLschema.xsd
A class inside my project uses this xml schema to validate xml files before importing them.
This class has a local variable pointing out the schema path:
schemaFilePath = "resources" + File.separator + "xml-schemata" + File.separator + "someXMLschema.xsd"
Of course this works locally.
Now I want to put my tool in a jar to give to other people.
But the project using the jar can't find the schema, because of maybe two things:
- The jar build process has removed the resources folder so that the xml-schemata folder is in the jar root folder.
- The project doesn't even look inside the used jar, but assumes a local resources/xml-schemata folder.
Which of these could be the problem and how could I solve it?