Na Ubuntu 16.04, zainstalowałem scala
:Nie można zainicjować kompilatora: obiekt java.lang.Object w lustrze kompilator nie znaleziono
$ls ~/Binary/scala-2.11.8
bin doc lib man
$grep -A 2 SCALA ~/.bashrc
SCALA=~/Binary/scala-2.11.8
SBT=~/Binary/sbt
export PATH=$PATH:$SCALA/bin:$SBT/bin
Z openjdk8
zainstalowanego scala
zawiedzie podczas otwierania rEPL:
$javac -version
javac 1.8.0_91
$
$scala
Welcome to Scala 2.11.8 (OpenJDK 64-Bit Server VM, Java 9-internal).
Type in expressions for evaluation. Or try :help.
scala>
Failed to initialize compiler: object java.lang.Object in compiler mirror not found.
** Note that as of 2.8 scala does not assume use of the java classpath.
** For the old behavior pass -usejavacp to scala, or if using a Settings
** object programmatically, settings.usejavacp.value = true.
Failed to initialize compiler: object java.lang.Object in compiler mirror not found.
** Note that as of 2.8 scala does not assume use of the java classpath.
** For the old behavior pass -usejavacp to scala, or if using a Settings
** object programmatically, settings.usejavacp.value = true.
Jak mogę to rozwiązać?
Jaka jest wartość JAVA_HOME w twoim komputerze? –
To nie jest ustawione. Ale naprawiłem to za pomocą 'sudo update-alternatives --config javac', aby używać openjdk-8 zamiast'/usr/lib/jvm/java-9-openjdk-amd64/bin/java'. –
Czy ustawienie JAVA_HOME usunęło błąd? –