I have a problem which I can't find much help for on google. My project is a Maven project. For those unfamiliar, the Maven project structure is basically this:
Java code is placed in the java folder and resources (such as images) are placed in the resource folder.src/main/java
We have several files, which are in the resource directory, such as:
Now, when you package the project into a jar, the file structure changes a bit:src/main/resources/SpriteMap.xml
You'll notice the src/main no longer exists.resources/SpriteMap.xml
So, to access a resource within a jar, I use the code:
While I can find a lot of stuff from people saying what the problem is, I have been unable to find an actual solution. Does anyone have any ideas?