IntelliJ unable to compile my project
In most cases your project JDK is not compatible with Scala or sbt version, try to change the Scala Compile Server SDK.
Ctrl+Alt+Sto open Settings/Preferences dialog.
- From the options on the left, select Build, Execution, Deployment | Compiler | Scala | Scala Compiler Server.
- In JVM SDK field specify the appropriate SDK.
We recommend that you switch to Java 8 SDK since the Scala version 2.12, and sbt versions 1.10 and later are not compatible with older Java SDK versions.
Script Shebang (linux)
Use this lines on the top of a
#!/bin/sh exec scala "$0" "$@" !# // Some scala code
and set the file as executable.
$ chmod +x script.sh $ ./script.sh (and it would run)