title: SBT Set javac max heap
body: <p>I'm trying to compile some very large Java source files in a Scala/SBT project. How can I set the max heap size for the Java Compiler (javac). </p>
  
  <p>Setting</p>
  
  <p><code>javacOptions in Compile ++= Seq("-target", "1.7", "-source", "1.7", "-Xmx1g")</code></p>
  
  <p>fails with an invalid argument exception on <code>-Xmx1g</code>... Setting <code>-J-Xmx2g</code> give similar errors.</p>
  
  <p>Is there a way I can fork <code>javac</code>?</p>
  
  <p>Using sbt v 0.13.8</p>