Many times, a Java app needs to connect to the Internet. The most common example happens when it is reading an XML file and needs to download its schema.
I am behind
JVM uses the proxy to make HTTP calls
System.getProperties().put("http.proxyHost", "someProxyURL"); System.getProperties().put("http.proxyPort", "someProxyPort");
This may use user setting proxy
System.setProperty("java.net.useSystemProxies", "true");