Exporting resources in a jar file

From my understanding, a jar file is basically a zip file that’s compressed to run using each other.

How I load my resources

wood = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/wood.png"));

I have a folder that’s not under the src folder, it’s its’ own foflder. example:

scr
packages

res
libs

I figured it out using this syntax, but forgot. Right now I have a jar file in a folder with the res folder. How can I make the jar file hold everything itself.(Such as minecraft and other downloadable java games) Whenever I export it cmd tells me it couldn’t find the textures.

exception:

Exception in thread "main" java.lang.RuntimeException: Resource not found: ./res
/FlubberFlap.png
        at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoa
der.java:69)
        at com_FlubberSpace.Game.main(MainFS.java:87)

Can you also explain what happens when I put ./ and / before the res.

FAQ: cannot find the resource/file

I’m away from my pc atm. What if I’m 100% sure there is no problem with the res and there is no copy of it? If there is no problem with it, what could be the matter? ???

If there would be no problem, it would work. :expressionless: