Working when runned from netbeans not when compiled
I am making image viewer application where images are loaded to memory using BufferedImage with the following code:
File path = some path
InputStream input = new FileInputStream(path);
image = ImageIO.read(input);
Application is made so it loads lots of images, with increased heap space up to 1GB. When runned using netbeans it works fine, loading all images it should without any problem. Using jar file it loads untill it uses about 300 mb of RAM and then it stops. I've check where the problem is, after it gets to that point it just wont create new image(line 4 doesnt work). I've tried with more than one set of images so image path should not be the problem i'm looking for.
Re: Working when runned from netbeans not when compiled
The problem is probably the path. Print out the absolute path for the File object you create to see where the program is looking for the file.