Wednesday, October 17, 2018

java - How to export textures with JarSplice?



I have another game that uses rectangles instead of textures which works fine. When I run it I get this error:


C:\Users\Owner>cd desktop

C:\Users\Owner\Desktop>java -jar FLIPPERFLAP1.0.jar
java.io.FileNotFoundException: res\FlubberFlap.png (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:131)
at FSMain.MainFS.main(MainFS.java:68)


C:\Users\Owner\Desktop>

In line 68 where I load the texture, I do this :


wood = TextureLoader.getTexture("PNG", new FileInputStream(new File("res/SuperGuy.png")));

It works when I use the IDE (eclipse) but not after exported. The images are in a source folder called res. When I use JarSplice do I have to export the textures in natives or jars?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...