gpt4 book ai didi

scala - 奇怪的错误消息 : bad symbolic reference. package.class 中的签名指的是包 org 中的术语 apache,该术语不可用

转载 作者:行者123 更新时间:2023-12-03 14:56:36 25 4
gpt4 key购买 nike

当我尝试编译简单类型安全的 akka 程序(scala 2.10、akka、2.1.0)时:

 scalac -cp "akka-actor_2.10-2.1.0.jar:akka-camel_2.10-2.1.0.jar" write2.scala

error: bad symbolic reference. A signature in package.class refers to term apache
in package org which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling package.class.
error: bad symbolic reference. A signature in package.class refers to term camel
in value org.apache which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling package.class.
write2.scala:21: error: bad symbolic reference. A signature in package.class refers to term model
in value org.camel which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling package.class.
val mina = system.actorOf(Props[MyEndPoint])

three errors found

第 21 行的代码:
 val mina = system.actorOf(Props[MyEndPoint])

(同样的程序在Eclipse中编译正确,所以源码没问题)

-cp 变量中很可能缺少某些 jar 文件。问题是 奇怪/无用的错误消息是什么意思。

谢谢,托马斯

最佳答案

消息显示“我的类路径中没有包 org.apache,我在读取文件 package.class 时需要它”。通行证-Ylog-classpathscalac并查看到达编译器的真正类路径是什么。

关于scala - 奇怪的错误消息 : bad symbolic reference. package.class 中的签名指的是包 org 中的术语 apache,该术语不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14336834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com