在 Javafx 1.x(1.2 和 1.3.1)中使用 Scala 2.8.x(2.8.0 和 2.8.1)时出现错误的类文件错误

发布于 2024-08-28 23:13:01 字数 636 浏览 1 评论 0原文

当尝试在 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。

When trying to import scala.Option in a javafx script, I get the following javafxc error:

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;

I am using Scala 2.8.1, Javafxc 1.3.1_b101, JVM 1.6.0_21-b06, OS Ubuntu 10.10. The same code was working in Scala 2.7.7 .

Later edit:
The same error is reported in case I import scala.immutable.Seq/List/Traversable/Iterable . I have tried the imports in a default Netbeans 6.9.1 JavaFX project which has in the classpath only scala-library.jar.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝天 2024-09-04 23:13:01

它首先让我想起了 #4067,但这个看起来很不同。

我建议您尝试使用 2.8.1 或 2.9 trunk 重现该错误,也许它已修复?

It reminded me first of #4067, but this one looks quite different.

I would suggest that you try to reproduce the error with 2.8.1 or 2.9 trunk, maybe it is fixed?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文