Last week I published a simple method which downloads (and then stores in a local file) a file from the internet.

But, the above method won't work if you are using your application on a computer connected to the internet behind a proxy server. To solve this little problem you have to set the properties of your virtul machine. 

It is really simple, in the method that initializes your application, add the following couple of lines

System.setProperty("http.proxyHost", "123.234.34.45"); // set here the address of your proxy
System.setProperty("http.proxyPort", "81"); // set here the port of your proxy

 

Gg1