How to change the JDK installed by importing SBT in IntelliJ IDEA?

When the Scala plugin reimports the SBT project into IntelliJ IDEA, it changes the project JDK to 1.6. This is a way to choose which Scala version JDK plugin is installed during the reimport STB project.

+4
source share
2 answers

You can set JDK parameters like javacOptions in Compile ++= Seq("-source", "1.7", "-target", "1.7", "-Xlint:unchecked", "-Xlint:deprecation")etc. at the SBT level in your project settings. This should help IntelliJ use the correct version of the JDK.

+3
source

Running sbt as follows resolved it for me

sbt -java-home `/usr/libexec/java_home -v 1.7`
0
source

Source: https://habr.com/ru/post/1524300/


All Articles