I just started a new game project and I want to create the world by reading a file.
In Eclipse everything is just fine and the file is successfully loaded. The images that are used are being loaded as well.
But if I compile the project and execute the .jar
the images still work but the file could not be found.
I loaded the image by using the classpath:
ImageIO.read(SpriteSheet.class.getResourceAsStream("..."));
and the file by using the path:
new File("...")
They are both in the same folder and I do not now why this does not work because in Eclipse everything just worked fine but after compiling it does not work anymore.