How to change relative paths of files when deploying project

Multi tool use


How to change relative paths of files when deploying project
This is my project structure:
When I execute my programm inside netbeans I load the xosc files using this path:
XMLReaderWriter.getXMLDocument("./src/Vorlagen/OpenScenario/OS_TemplateVTD.xosc");
And it works because I work inside the project. But after I deploy the project and execute the jar file I get this error:
The problem is that when I execute the jar file, it tries to load files from the "dist" order instead of the actuall folder. How can I deploy the files inside the dist order in order to access the files wen I execute the jar file?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.