title: SBT Install Java OutOfMemoryError: Java Heap Space
body: <p>I'm trying to install the Typesafe Stack on OSX Lion. I started using homebrew to install the packages. After sbt was installed I tried to run: $sbt sbt-version to install the starter/sample projects, but get the error below. I downloaded the sbt jar directly and modified the launch command to the parameters below, but I still get the error.</p>
  
  <p>java -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384m -Xms512M -Xmx2048M -Xss1M -jar /usr/bin/sbt-launch.jar "$@"</p>
  
  <pre><code>    sbt appears to be exiting abnormally.
    The log file for this session is at /var/folders/gd/10z2cmwn08326_kzllgcsw6r0000gp/T/sbt6677013893019609869.log
  java.lang.OutOfMemoryError: Java heap space
      at java.util.Arrays.copyOfRange(Arrays.java:3209)
      at java.lang.String.&lt;init&gt;(String.java:215)
      at java.lang.StringBuilder.toString(StringBuilder.java:430)
      at java.io.UnixFileSystem.resolve(UnixFileSystem.java:93)
      at java.io.File.&lt;init&gt;(File.java:312)
      at sbt.FilterFiles$$anonfun$handleFile$1.apply(Path.scala:199)
      at sbt.FilterFiles$$anonfun$handleFile$1.apply(Path.scala:198)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
      at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
      at sbt.FilterFiles.handleFile(Path.scala:198)
      at sbt.DescendentOrSelfPathFinder.sbt$DescendentOrSelfPathFinder$$handleFileDescendent(Path.scala:214)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:216)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:215)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
      at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
      at sbt.DescendentOrSelfPathFinder.sbt$DescendentOrSelfPathFinder$$handleFileDescendent(Path.scala:215)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:216)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:215)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
      at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
      at sbt.DescendentOrSelfPathFinder.sbt$DescendentOrSelfPathFinder$$handleFileDescendent(Path.scala:215)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:216)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:215)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
      at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
      at sbt.DescendentOrSelfPathFinder.sbt$DescendentOrSelfPathFinder$$handleFileDescendent(Path.scala:215)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:216)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:215)
      at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
      at scala.collection.mutable.ArrayOps.foreach(ArrayOps.scala:38)
      at sbt.DescendentOrSelfPathFinder.sbt$DescendentOrSelfPathFinder$$handleFileDescendent(Path.scala:215)
      at sbt.DescendentOrSelfPathFinder$$anonfun$sbt$DescendentOrSelfPathFinder$$handleFileDescendent$1.apply(Path.scala:216)
  Error during sbt execution: java.lang.OutOfMemoryError: Java heap space
  </code></pre>