title: Sbt project loading error - "java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter"
body: <p>In IntelliJ Idea on OS X I have a project (a Coursera assignment file, with no homework functions implemented yet) that is compiling in Idea, but when I try to load it in sbt in the terminal from the project root folder, using just "sbt", I get the error:</p>
  
  <pre><code>[info] Loading project definition from &lt;omitted&gt;/calculator/project  
  java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter  
     at sbt.inc.TextAnalysisFormat$ObjectStringifier$$anonfun$34.apply(TextAnalysisFormat.scala:336)
  &lt;trace omitted&gt;  
  [error] (compile:readAnalysis) java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter  
  Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
  </code></pre>
  
  <p>build.sbt scalaVersion is 2.11.7; in the Idea project structure window Global Libraries tab, I have scala-sdk-2.12.4, and in the SDKs and Project tabs, I have Java 1.8.</p>
  
  <p>Brew tells me I have sbt 1.0.4, but when I run sbt --about from the project folder, it shows me:</p>
  
  <pre><code>[info] This is sbt 0.13.9  
  [info] No project is currently loaded  
  [info] sbt, sbt plugins, and build definitions are using Scala 2.10.5
  </code></pre>
  
  <p>followed by an attempt to load the project and the resulting error. The build.properties file in the project has sbt version 0.13.9, but why does the sbt about info show Scala 2.10.5?</p>
  
  <p>I have both Java 8 and Java 9 installed on my system (via brew cask) - is it possible that sbt is for some reason using Java 9 instead of Java 8, and if so, how would I check and fix that? The install command for Java 9 was "brew cask install java", while for Java 8 it was "brew cask install java8".</p>
  
  <p>Edit: "java -version" command shows:</p>
  
  <pre><code>java version "9.0.1"
  Java(TM) SE Runtime Environment (build 9.0.1+11)
  Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
  </code></pre>