public BufferedImage readImage(String fileLocation) {
BufferedImage img = null;
File file = new File("D:\\logo.jpg");
img = ImageIO.read(file);
}
throwing error can;t read the file
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The code should be like as follows,
Then you can trace actual cause of the problem as we are printing message and stack trace if exception occurs.