加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – 奇怪的错误信息:坏的符号引用. package.class中的一个

发布时间:2020-12-16 09:22:17 所属栏目:安全 来源:网络整理
导读:当我尝试编译简单的类型安全’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.scalaerror: bad symbolic reference. A signature in package.class refers to term apachein package org whic
当我尝试编译简单的类型安全’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中被正确编译,所以源代码是OK的)

在-cp变量中可能有一些jar文件丢失.问题是什么意思是奇怪/无用的错误信息.

谢谢Tomas

解决方法

消息说“我的类路径中没有包org.apache,在读取文件package.class时需要它”.将-Ylog-classpath传递给scalac,并查看到编译器的真正类路径是什么.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读