title: Why doesn't Java have constants for well-known system property names?
body: <p>The <strong>java.lang.System</strong> class defines a number of <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties()" rel="noreferrer">well-known properties</a>.</p>
  
  <p>For example, you can obtain the JVM's temporary directory by looking up the "java.io.tmpdir" property:</p>
  
  <pre><code>... = System.getProperty("java.io.tmpdir");
  </code></pre>
  
  <p>What I don't understand is why these properties aren't defined as constants (e.g. in the java.lang.System class). This would be a lot less error-prone than using literal Strings. In other words, I would like to be able to do this:</p>
  
  <pre><code>... = System.getProperty(System.JAVA_IO_TMPDIR);
  </code></pre>
  
  <p>Any ideas why this wasn't done? It could even be added in a future release of Java without breaking backward compatibility. Or am I missing something obvious?</p>