BufferedImage img = null; try { img = ImageIO.read(new File("C:/ImageTest/pic2.jpg")); // eventually C:ImageTestpic2.jpg } catch (IOException e) { e.printStackTrace(); }