title: System proxy setting, Java
body: <p>I have an application which needs to connect to net. I need some advice when dealing with proxy Connections. Currently the user sets the proxy settings and hence I use the entered information to connect. Is there a better way to deal with such situations.</p>
  
  <p>I mean something like chrome which opens system's proxy settings and then uses them. How to do it and retrieve those values? Any other Ideal method?</p>
  
  <p>Secondly, currently I am checking if there is a proxy set or not. If yes, I am using <code>url.openConnection(proxy);</code>
  IF not then plain <code>url.openConnection();</code> Is there a more cleaner way of doing it? where system automatically connects with proxy set.</p>