Given:
$cat build.sbt
scalaVersion := "2.11.8"
libraryDependencies ++= List(
"io.spray" %% "spray-client" % "1.3.3"
,"io.spray" %% "spray-json" % "1.3.2"
,"com.typesafe.akka" %% "akka-actor" % "2.4.2"
,"com.typesafe" % "config" % "1.3.0"
,"org.scalatest" % "scalatest_2.11" % "2.2.6" % "test"
)
Using this answer, I attempted to use JDK 7.
However, I got the following errors:
$sbt -java-home /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/ clean test
[info] Loading project definition from /Users/Kevin/Workspace/Work/project/project
[info] Set current project to project (in build file:/Users/Kevin/Workspace/Work/project/)
[success] Total time: 0 s, completed Mar 14, 2016 3:51:10 PM
[info] Updating {file:/Users/Kevin/Workspace/Work/project/}project...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] Compiling 9 Scala sources to /Users/Kevin/Workspace/Work/project/target/scala-2.11/classes...
[error] Class java.time.Duration not found - continuing with a stub.
[error] Class java.time.Duration not found - continuing with a stub.
[error] two errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 5 s, completed Mar 14, 2016 3:51:16 PM
Looking at this answer, I'm guessing/speculating that I need to add a java8 time library as a dependency?