Resource not found?
Posted
by
SystemNetworks
on Game Development
See other posts from Game Development
or by SystemNetworks
Published on 2012-09-23T13:09:49Z
Indexed on
2012/09/23
15:50 UTC
Read the original article
Hit count: 495
When I write in my terminal, java -jar myJar.jar
, it gives me an error "Resource Not found res/playNow.png" When I run it in eclipse, it does not give me any errors about this image.
My folder in my eclipse is outside my package called res and inside it are images.
This is the full error
Exception in thread "main" java.lang.RuntimeException: Resource not found: res/playNow.png
at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoader.java:69)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:169)
at org.newdawn.slick.Image.<init>(Image.java:196)
at org.newdawn.slick.Image.<init>(Image.java:170)
at org.newdawn.slick.Image.<init>(Image.java:158)
at org.newdawn.slick.Image.<init>(Image.java:136)
at javagame.Menu.init(Menu.java:31)
at javagame.Game.initStatesList(Game.java:21)
at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:164)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:390)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at javagame.Game.main(Game.java:32)
I'm using a terminal in my mac. How do I fix the error Resource Not Found? I'm using slick2d!
© Game Development or respective owner