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

前端 未结 8 1945
走了就别回头了
走了就别回头了 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:04

    Using the Java 8 version of OpenJDK resolved this issue for me.

    sudo update-alternatives --config java
    sudo update-alternatives --config javac
    
    0 讨论(0)
  • 2020-12-05 23:07

    Worked with this java version "1.8.0_144"

    Uninstall java and apache-spark

    install java, install apache-spark

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

    Installing java version "1.8.0_144" resolved the issue for me. I had installed jdk 1.9 previously.

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

    i had a zip of my jdk at the same location. Removing the zip did the trick for me.

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

    Installing Java 8 resolved this issue.

    I downloaded java 8 and i extracted that to the following location : /usr/lib/jvm/jdk1.8.0_172

    After doing this update the JAVA_HOME path to the same : /usr/lib/jvm/jdk1.8.0_172

    This will resolve the issue.

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

    I ran into the same issue. Uninstall Java 9

    sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
    sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
    

    Ref: https://gist.github.com/schnell18/bcb9833f725be22f6acd01f94b486392

    Install Java 8.

    Everything seems to good now.

    Btw: this was for mac. Might be useful for you.

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