In my efforts to become a modern java programmer I have started using
ImageIO to load images into my aplications. So I've left the old ways;
using FileInputStream - reading bytes - using toolKit to make image -
and closing the stream.
Well, when using this method
..there is no ways of closing the inputfile, so one should assume that this
BufferedImage img=ImageIO.read(File f);
ImageIO.read -method had the brains to close the file, but apparently it
Program crashes occurs during application development, but beware: if you
have used this ImageIO to load image files, and your program crashes, then
don't be surprised if the images are GONE !!
I tried with this approach:
And now the entire "images" folder is gone, including the backupfolder at
File f = new File(cp+"\\dgame\\images\\" + fileName);
FileInputStream in=new FileInputStream(f);
diceImages[j] = ImageIO.read(in);
Until someone can explain this to me I will never touch ImageIO ever again !!!