title: Crowdsourcing a Complete list of Common Java System Properties and Known Values
body: <p><em>I've been inspired by another question: <a href="https://stackoverflow.com/questions/487590/best-practice-for-using-java-system-properties">Best Practice for Using Java System Properties</a></em></p>
  
  <p>I'm currently looking for a complete list of Java system properties and possible values. I'm working on a simple class to simplify use of them (If you're interested, <a href="http://github.com/molindo/molindo-utils/raw/master/src/main/java/at/molindo/utils/properties/SystemProperty.java" rel="nofollow noreferrer">get the source</a> and <a href="http://techblog.molindo.at/2009/11/java-system-properties.html" rel="nofollow noreferrer">background info (my blog)</a>). With this class, I try to provide the following:</p>
  
  <ul>
  <li>simple and consistent access to Java system properties (no String constants)</li>
  <li><em>full</em> documentation of available properties and their possible values – within my IDE (i.e. auto-completion, inline Javadoc)</li>
  <li>fix inconsistencies in returned values and/or naming</li>
  <li>make sure that java.io.tmpdir exists – acutally that’s the main reason why I’m doing all this :)</li>
  </ul>
  
  <p>To get full documentation and a complete list of available properties (even those where availability is heavily JVM-dependent), I'd like you to <a href="http://github.com/molindo/molindo-utils/raw/master/src/main/java/at/molindo/utils/properties/SystemProperty.java" rel="nofollow noreferrer">download the source</a>, run it and post your results. I'll update the class accordingly and keep it available at the given location. Hopefully, it will ease live of some of you out there :)</p>
  
  <p>Edit:</p>
  
  <p>I'm not looking for standard properties as described by <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties%28%29" rel="nofollow noreferrer">System.getProperties()</a> or all properties that are available on my system. I'm trying to create a comprehensive list of system properties - even those that are vendor, jvm or version related - those that aren't guaranteed to exist and whose documentation is sparse or hard to find. Properties like </p>
  
  <ul>
  <li>sun.desktop (Linux only, e.g. "gnome"), </li>
  <li>awt.toolkit (Mac only, e.g. apple.awt.CToolkit)</li>
  <li>sun.cpu.endian (Sun JVMs only)</li>
  <li>...</li>
  </ul>
  
  <p>I'd love to get others to run my code and post their results in order to compile a comprehensive list (with extensive documentation of properties and their possible values) in the form of a Java enum that's easy to use e.g.:</p>
  
  <pre><code>String file = SystemProperty.JAVA_IO_TMPDIR + "file.txt";
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>String tmp = System.getProperty("java.io.tmpdir");
  if (!tmp.endsWith(File.separator)
      tmp += File.separator;
  new File(tmp).mkdirs(); // make sure tmp exists
  String file = tmp + "file.txt";
  </code></pre>
  
  <p>So please run that code and post your findings. Here is a simple script to get you started:</p>
  
  <pre><code>#!/bin/bash
  # download and run
  # you should really look at the code first, as you can't be sure
  # that I'm a trustworthy guy ;)
  wget -N http://techblog.molindo.at/files/SystemProperty.java
  javac SystemProperty.java
  java SystemProperty
  </code></pre>
  
  <p><em>(I know this isn't a real question but rather a crowd sourcing thing. I hope nobody minds)</em></p>
  
  <p><strong>Bounty:</strong></p>
  
  <p>As there is no correct answer to this question, the bounty will be awarded to the person who discovers most new system properties. As a hint: testing non-standard JVMs (J2ME, Android, GCJ, OpenJDK, Apache Harmony, ...) and common languages on top of the JVM (Groovy, Scala, JRuby, ..) should be especially yielding.</p>
  
  <p>Current leaders:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/1803075/crowdsourcing-a-complete-list-of-common-java-system-properties-and-known-values/1859729#1859729">rsp</a> 19 discovered properties</li>
  <li><a href="https://stackoverflow.com/questions/1803075/complete-list-of-available-java-system-properties-and-known-values/1815698#1815698">Boris</a> 14 discovered properties</li>
  <li><a href="https://stackoverflow.com/questions/1803075/crowdsourcing-a-complete-list-of-common-java-system-properties-and-known-values/1867710#1867710">Joa Ebert</a> 8 discovered properties</li>
  <li><a href="https://stackoverflow.com/questions/1803075/complete-list-of-available-java-system-properties-and-known-values/1803144#1803144">Suraj Chandran</a> 1 discovered property</li>
  </ol>
  
  <p>Btw, I'm planning to release the final result as a Maven artifact and upload it to the central repository as soon as I have enough input.</p>
  
  <p><strong>UPDATE: Public Repository, finally</strong></p>
  
  <p><a href="http://github.com/molindo/molindo-utils/blob/master/src/main/java/at/molindo/utils/properties/SystemProperty.java" rel="nofollow noreferrer">SystemProperty.java</a> is now available on GitHub, as part of the <a href="http://github.com/molindo/molindo-utils" rel="nofollow noreferrer">molindo-utils project</a>. molindo-utils is currently available as <a href="https://oss.sonatype.org/content/repositories/snapshots/at/molindo/molindo-utils/1.0-SNAPSHOT/" rel="nofollow noreferrer">1.0-SNAPSHOT through Sonatype's OSS repository</a>. As soon as it's ready for release, it will be synchronized to Maven central as well.</p>
  
  <pre><code>&lt;repositories&gt;
    &lt;repository&gt;
      &lt;id&gt;oss.sonatype.org&lt;/id&gt;
      &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots/&lt;/url&gt;
      &lt;releases&gt;&lt;enabled&gt;false&lt;/enabled&gt;&lt;/releases&gt;
      &lt;snapshots&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/snapshots&gt;
    &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;at.molindo&lt;/groupId&gt;
      &lt;artifactId&gt;molindo-utils&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>