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

编程入门 行业动态 更新时间:2024-10-28 01:22:33
本文介绍了奇怪的错误信息:错误的符号引用.package.class 中的签名指的是 package org 中不可用的术语 apache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

When I tried to compile simple typesafe' akka program (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中编译正确,所以源码没问题)

(The same program was compiled correctly in Eclipse, so the source code is OK)

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

Most likely some jar file is missing in -cp variable. The question is what mean that strange/useless error message.

谢谢,托马斯

推荐答案

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

The message says "There's no package org.apache in my classpath, and I need it while reading file package.class". Pass -Ylog-classpath to scalac and look at what is the real classpath that gets to the compiler.

更多推荐

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

本文发布于:2023-11-25 04:23:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628307.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:指的是   错误信息   中不   术语   符号

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!