You can specify the proxy server using the following code snippet. Just
add these lines before you make the connection.
System.setProperty("http.proxyHost",
"");System.setProperty("http.proxyPort", "");Or
you can pass them in arguments as system properties to the java
program-java -Dhttp.proxyHost= -Dhttp.proxyPort=