When the variable "proxy" is null, url.openConnection() is used, and benifits of VM args (http.proxyHost and http.proxyPort).

The only solution to bypass the proxy, while keeping existing VM args, is to add a System property "http.nonProxyHosts" in order to exclude the host of the proxy. This can be done with an other VM arg "-Dhttp.nonProxyHosts=xxxx" or programmatically : System.setProperty("http.nonProxyHosts", "xxxx")