0

when reading an image via ImageIO.read(url) I am getting a connection refused error. The URL consists of the public IP address + relative path to image. Is the error because of firewall settings? Over the browser, the URL works.

Chris
  • 89
  • 1
  • 10
  • This is unlikely to have anything to do with `ImageIO`. What happens if you just do `url.openStream()`? Does the error message tell you anything? Is it your server? If so, what is the error message on the server? How about adding the code and the URL you use to the question, to help other users help you? :-) As it stands, I'm voting to close this question. – Harald K May 18 '15 at 12:03

1 Answers1

0

Seems that something wrong with your code. Try this to debugging:

URL url = new URL("yoururlhere");
BufferedImage bi = ImageIO.read(url);

System.out.println(bi);
Aless
  • 289
  • 1
  • 9
  • Hi Aless, thanks code is correct it seems to be related with the server' settings. – Chris May 17 '15 at 17:13
  • I doubt that it is related to firewall settings if images available to open over the browser. Check the log files of your environment to find out possible problems. – Aless May 17 '15 at 19:54