title: How to force SBT to use Java 8?
body: <p>How can I force SBT to compile to Java 8 class files. I added scalacOptions += "-target:jvm-1.8" but it gives the following error message: </p>
  
  <pre><code>[error] 'jvm-1.8' is not a valid choice for '-target'
  [error] bad option: '-target:jvm-1.8'
  [error] (compile:compile) Compilation failed
  </code></pre>
  
  <p>I am using SBT version 0.15.5.</p>
  
  <p>I know I am using Java 8 to compile as I added this to build.sbt, but I still wonder why the scalacOptions fails and I don't know what output the scalac produces.</p>
  
  <pre><code>initialize := {
    val _ = initialize.value
    if (sys.props("java.specification.version") != "1.8")
      sys.error("Java 8 is required for this project.")
  }
  </code></pre>