在MAC中运行scala时出现“java.lang.ClassNotFoundException:binder0”错误

时间:2015-02-18 10:14:13

标签: java macos scala

我在我的macbook中安装了scala但是当我从终端启动它时,我收到以下错误:


**scala> error: error while loading Consumer, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/rt.jar(java/util/function/Consumer.class)' is broken
(bad constant pool tag 18 at byte 15)
error: error while loading CharSequence, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(bad constant pool tag 18 at byte 10)
<script>:1: error: type InterpreterSettings is not a member of package scala.tools.nsc
object binder0{ var value: scala.tools.nsc.InterpreterSettings = _;  def set(x: Any) = value=x.asInstanceOf[scala.tools.nsc.InterpreterSettings]; }
                                           ^
<script>:1: error: type InterpreterSettings is not a member of package scala.tools.nsc
object binder0{ var value: scala.tools.nsc.InterpreterSettings = _;  def set(x: Any) = value=x.asInstanceOf[scala.tools.nsc.InterpreterSettings]; }
                                                                                                                            ^
Exception in thread "main" java.lang.ClassNotFoundException: binder0**

是否有关于java_home设置的内容? 请帮我解决。

1 个答案:

答案 0 :(得分:0)

这可能是因为Java 8目前仅受“实验性”支持,请参见此处:

http://scala-lang.org/news/2.11.1