So my program is finally done in it's first version. I can run it in Eclipse IDE without any problems, but as soon as I pack it up into a Jar-File, it can't find the files that were in a folder within the project (declared as source folder). I already know, that while compiling, the folder structure changes and I tried working around that, but it doesn't work and I don't want to stick to such a work-around.
Project structure:
- src/main/java/
+ [my packages]
- resources/
+ configs/[some files]
+ languages/[some language files]
+ levelcards/[some images]
In my program im accessing i.e. the files inside "configs" with
new File("./resources/configs/[...]");
and it works absolutely fine, as the folder exists in the project. After compiling it doesn't though, so I tried it with
new File("./configs/[...]");
but it doesn't work either.
What I expect is it working regardless of me launching it in Eclipse or via the JRE directly, though I have no idea how to get it to that point. If you can help me out in any way, I would appreciate it!
Gregor