Hab es ausprobiert, aber da bekomme ich folgende Exception:
Woran kann das liegen?
//EDIT: Jetzt kommt zwar keine Exception, allerdings gibt er in der Konsole
aus.
Code:
Exception in thread "main" javax.imageio.IIOException: Can't get input stream from URL!
at javax.imageio.ImageIO.read(Unknown Source)
at II2.main(II2.java:17)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
... 2 more
Woran kann das liegen?
//EDIT: Jetzt kommt zwar keine Exception, allerdings gibt er in der Konsole
Code:
http://www.webshotspro.com/gd/show.php/400x300/screenshots/cff81936b955dfdecbdd987a11dcb57d.jpg
http://www.webshotspro.com/gd/show.php/400x300/screenshots/cff81936b955dfdecbdd987a11dcb57d.jpg
ERRORED
Zuletzt bearbeitet: