We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello everyone! o/ I hope I'm in the right category. Well, I have a problem with my exported JAR file. I load some Images with PApplet.loadImage(). In eclipse it works without problems. But if I try it to export them into a JAR file, I got some exceptions.
My project structure:
Well, I load the Images from my Background.java with PApplet.loadImage("img/galaxy.gif") for example. It works in eclipse, but if I try it to export them to a JAR file and run it after, it gives me some exceptions:
java.lang.NullPointerException at processing.core.PApplet.dataFile(PApplet.java:8016) at processing.core.PApplet.dataPath(PApplet.java:7993) at processing.core.PApplet.createInputRaw(PApplet.java:7093) at processing.core.PApplet.createInput(PApplet.java:7011) at processing.core.PApplet.loadBytes(PApplet.java:7301) at processing.core.PApplet.loadImage(PApplet.java:5439) at processing.core.PApplet.loadImage(PApplet.java:5363) at make.object.Background.setup(Background.java:47) at make.Applet.setup(Applet.java:16) at processing.core.PApplet.handleDraw(PApplet.java:2412) at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1557) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)
Well, this line here: at make.object.Background.setup(Background.java:47)
It tells me it can't find any images. I had check my JAR file and the structure looks okey. I have my img folder here, my make folder (with the other stuff inside) and the imported core library. But why it doesn't load my images now?
Sorry for my bad english. I hope you understand my problem. ^^