无法运行 Scala

无法运行 Scala
kdtrey@durantstat:~$ scala
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
Welcome to Scala version 2.9.2 (OpenJDK 64-Bit Server VM, Java 1.8.0_45-internal).
Type in expressions to have them evaluated.
Type :help for more information.

scala> [init] error: error while loading AnnotatedElement, class file '/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(bad constant pool tag 18 at byte 76)

有解决方法吗?我尝试重新安装 openJDK,但也没有用。

答案1

Scala 2.9.2 与 Java 8 配合不佳,因此请升级 Scala 或降级 Java。这是一个几乎重复的问题

相关内容