title: How do I set a system property for my project in sbt?
body: <p>I'm sure I'm missing something really simple... I want to set the system property <code>java.awt.headless</code> to <code>true</code> for my sbt project. Reading the <a href="http://code.google.com/p/simple-build-tool/wiki/Properties" rel="noreferrer">page on properties</a> I think that I need to use <code>system</code> or <code>systemOptional</code>. In my project file I've tried things like:</p>
  
  <pre><code>lazy val javaAwtHeadless = system[Boolean]("java.awt.headless")
  </code></pre>
  
  <p>Setting it as a user property (e.g. <code>lazy val javaAwtHeadless = property[Boolean]</code>) and setting the accompanying value in <code>build.properties</code> made the property visible in the sbt console but not within sbt's Scala console (via <code>System.getProperty("java.awt.headless")</code>).</p>
  
  <p><code>set java.awt.headless true</code> from the sbt console works, including being set in the Scala console, but it doesn't persist to the next time I launch sbt.</p>