尝试在 javafx 脚本中导入 scala.Option 时,出现以下 javafxc 错误:
cannot access scala.Option.$anonfun$orNull$1
bad class file: scala/Option$$anonfun$orNull$1.class(scala:Option$$anonfun$orNull$1.class)
undeclared type variable: A1
Please remove or make sure it appears in the correct subdirectory of the classpath.
import scala.Option;
我正在使用 Scala 2.8.1、Javafxc 1.3.1_b101、JVM 1.6.0_21-b06、操作系统 Ubuntu 10.10。相同的代码在 Scala 2.7.7 中工作。
稍后编辑: 如果我导入 scala.immutable.Seq/List/Traversable/Iterable ,则会报告相同的错误。我已经在默认的Netbeans 6.9.1 JavaFX 项目中尝试了导入,该项目在类路径中只有 scala-library.jar。