I did see the question about setting the proxy for the JVM but what I want to ask is how one can utilize the proxy that is already configured (on Windows).
Here is a
try{ System.setProperty("java.net.useSystemProxies", "true"); String prx = ProxySelector.getDefault().select(new URI("http://www.google.com")).get(0).address().toString(); JOptionPane.showMessageDialog(null, prx); } catch(Exception e){ JOptionPane.showMessageDialog(null, "no proxy"); }