The following code works successfully in the BlueJ IDE, but not in Eclipse.
String path="images/pic1.jpg"; BufferedImage myPicture = null; try { myPicture = ImageIO.read(new File(path)); } catch (IOException e) {
My image path is the same as the IDE. In addition, I noticed that the directory structure is the same for * .class files and image files.
Why does this only happen in eclipse?
source share