奇怪的错误信息:错误的符号引用.package.class中的签名是指包org中的术语apache,它不可用

xhu*_*dik 16 scala akka

当我尝试编译简单类型安全'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
Run Code Online (Sandbox Code Playgroud)

第21行的代码:

 val mina = system.actorOf(Props[MyEndPoint])
Run Code Online (Sandbox Code Playgroud)

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

很可能在-cp变量中缺少一些jar文件.问题是什么意味着奇怪/无用的错误信息.

谢谢,托马斯

Iul*_*gos 11

消息说" org.apache我的类路径中没有包,我在阅读文件时需要它package.class".传递-Ylog-classpathscalac查看编译器的真正类路径是什么.

  • 'package.class'是[package objects](http://www.scala-lang.org/docu/files/packageobjects/packageobjects.html)中定义的成员编译到的地方.此文件可能是类路径上另一个jar的一部分,不一定是您自己的代码.我希望这个信息更加简单. (2认同)