title: Java system Properties, http.proxyHost, two questions
body: <p>I am developing a Java application that makes HTTP requests, and half of my development time is behind a proxy.  So I have the following block in my code:</p>
  
  <pre><code>if (BEHIND_PROXY) {
      java.util.Properties systemProperties = System.getProperties();
      systemProperties.setProperty("http.proxyHost", PROXY_HOST);
      systemProperties.setProperty("http.proxyPort", PROXY_PORT);
  }
  </code></pre>
  
  <p>The idea is that I change the value of <code>BEHIND_PROXY</code> based on where I am.  I was working today, <strong>not</strong> behind a proxy, and forgot to set <code>BEHIND_PROXY</code> to <code>false</code>.  However, the connection was still made successfully and my application received the data it requested.  How is this possible?  Is there something built into this, that if the proxy server cannot be reached, it simply tries again but bypasses the proxy on this retry?</p>
  
  <p>And a second question, I have been trying to find a complete list of system properties.  I have found many posts like <a href="https://stackoverflow.com/questions/1803075/crowdsourcing-a-complete-list-of-common-java-system-properties-and-known-values">THIS</a> one, but not one of them lists <code>http.proxyHost</code> or <code>http.proxyPort</code>, which makes me think they are clearly not very complete.  Am I searching wrong somehow?  Do these <code>http.x</code> properties belong in these other lists?  Is there a more complete list somewhere?</p>