My Build.scala file contents.
val commonSettings = Seq(
version := \"1.0.0\",
organization := \"com.collective\",
scalaVersion := \"2.11.4\",
scalacOptions +
If you want to change the heap size, you need to tell sbt to fork another JVM (this applies to any JVM option by the way). You can use the fork
setting to do so:
fork in run := true
Also, you want to make sure, that your options are properly separated (there is no additional parsing done by sbt):
javaOptions in run ++= Seq(
"-Xms256M", "-Xmx2G", "-XX:MaxPermSize=1024M", "-XX:+UseConcMarkSweepGC")
Alternatively, you can set the heap size in the sbt runner. If you are using normal sbt, you can modify the launcher script directly. If you are using sbt-extras, you can pass arguments to the JVM using the -J
flag:
sbt -J-Xmx2G # etc.