I tried it like this:
BufferedImage img = null;
try {
img = ImageIO.read(new File("strawberry.jpg"));
} catch (IOException e) {
}
That did not seem to work for me. My image is in a (eclipse) res-folder.
When I look up the whole path (C:/...) it seems to work. How can I make it load without the whole thing when it is in the same project?