Intellij: SBT-based Scala project does not build with Java 9

前端 未结 4 930
离开以前
离开以前 2020-12-15 08:56

I\'ve tried to switch my Scala/sbt based project to Java 9. If I compile the project with sbt, it works.

If I try to build the project with the Build option of Intel

4条回答
  •  醉酒成梦
    2020-12-15 09:31

    In addition to the above answers.

    If you are not using IntelliJ and running the program from sbt console, I found the following resolved the issue:

    • Adding the following to your build.sbt:

      libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.0"

    • Adding the import statement to your controller:

      import javax.xml._

提交回复
热议问题