I've just finished a project. In it there is the default src package (marked as source root), and two directories that I added, one contains textures and the other text files. I've marked both as resources roots.
I'm loading the pictures and text files in the program, and when running from the IDE it all works fine.
I've made an artifact using project structure > artifacts > new artifact (from module with dependencies), chose the main class and accepted, and then used build > build artifact > build.
It created the jar file and everything was ok, although when running it with the JAR file, all the textures were missing, and it only showed the drawn text / rects etc.
In the code, I loaded the textures with "resources/filename.png", because it's in the resources folder.
Looking in the jar file, I can see that all the textures and text files that used to be in the two directories, are in the base jar instead, and the only directories are src and META-INF, so I think that's the problem.
How can it be fixed?
P.S. It's my first post in the forums, so sorry if I'm doing something wrong.
P.P.S. Sorry for my bad English, I'm a foreign speaker.