Failed to initialize compiler: object java.lang.Object in compiler mirror not found

前端 未结 8 1946
走了就别回头了
走了就别回头了 2020-12-05 22:36

On Ubuntu 16.04, I installed scala:

$ls ~/Binary/scala-2.11.8
bin  doc  lib  man
$grep -A 2 SCALA ~/.bashrc
SCALA=~/Binary/scala-2.11.8
SBT=~/Bi         


        
相关标签:
8条回答
  • 2020-12-05 23:20

    Java 8 is deprecated, so downgrading to is must NOT be an acceptable solution.

    The correct solution is to upgrade your SBT to 0.13.17 or higher.

    0 讨论(0)
  • 2020-12-05 23:27

    This issue appears to be with Java 9 and gets solved with Java 8.

    If you have Java 8 and Java 9, and you would like to keep both, you can set your environment variable JAVA_HOME to the Java 8 path.

    For example:

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home

    You will need to replace jdk1.8.0_161.jdk with whichever version of the JDK that you have.

    You can find that version with:

    ls /Library/Java/JavaVirtualMachines/

    Once you set that environment variable, you can open a new terminal and run java -version to see if the version was set correctly.

    EDIT:

    It may be worth noting that I have a Mac even though this is a linux question.

    0 讨论(0)
提交回复
热议问题