微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

java – JADE无法找到代理

我是JADE的新手,在加载代理时遇到了一些麻烦.

我创建了一个新的IntelliJ项目并在“Dependencies”中添加了“jade.jar”和“commons-codec-1.3.jar”(我使用的是JADE 4.1.1)并勾选了导出框(我也试过没有它们打勾).然后我将示例中的“HelloWorldAgent.java添加到src中.我将运行配置设置为:

>主要类:jade.Boot
>程序参数:-gui testAgent:HelloWorldAgent
>使用模块的类路径:jadeCW(我的项目名称)

当我使用这个配置运行时,JADE的人确实启动但它找不到“HelloWorldAgent”.输出是:

14-Feb-2012 21:43:08 jade.core.Runtime beginContainer
INFO: ----------------------------------
    This is JADE 4.1.1 - revision 6532 of 2011/11/18 16:21:34
    downloaded in Open Source,under LGPL restrictions,at http://jade.tilab.com/
----------------------------------------
Retrieving Commanddispatcher for platform null
14-Feb-2012 21:43:08 jade.imtp.leap.LEAPIMTPManager initialize
INFO: Listening for intra-platform commands on address:
- jicp://192.168.1.66:1099

14-Feb-2012 21:43:08 jade.core.BaseService init
INFO: Service jade.core.management.AgentManagement initialized
14-Feb-2012 21:43:08 jade.core.BaseService init
INFO: Service jade.core.messaging.Messaging initialized
14-Feb-2012 21:43:08 jade.core.BaseService init
INFO: Service jade.core.resource.ResourceManagement initialized
14-Feb-2012 21:43:08 jade.core.BaseService init
INFO: Service jade.core.mobility.Agentmobility initialized
14-Feb-2012 21:43:08 jade.core.BaseService init
INFO: Service jade.core.event.Notification initialized
14-Feb-2012 21:43:08 jade.mtp.http.HTTPServer <init>
INFO: HTTP-MTP Using XML parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
14-Feb-2012 21:43:08 jade.core.messaging.MessagingService boot
INFO: MTP addresses: http://unkNown-00-19-c5-7e-cb-4b.home:7778/acc
14-Feb-2012 21:43:08 jade.core.AgentContainerImpl startBootstrapAgents
SEVERE: Cannot create agent testAgent: Class HelloWorldAgent for agent ( agent-identifier :name testAgent@192.168.1.66:1099/JADE ) not found [nested java.lang.classNotFoundException: HelloWorldAgent]
14-Feb-2012 21:43:08 jade.core.AgentContainerImpl joinPlatform
INFO: --------------------------------------
Agent container Main-Container@192.168.1.66 is ready.

关键问题显然是:

SEVERE: Cannot create agent testAgent: Class HelloWorldAgent for agent ( agent-identifier :name testAgent@192.168.1.66:1099/JADE ) not found [nested java.lang.classNotFoundException: HelloWorldAgent]

我已经尝试过使用eclipse,但是我遇到了同样的问题,我也试过使用早期版本的JADE但是再次没有运气.任何帮助将非常感激.

非常感谢

解决方法

启动时,您需要传递类的完全限定名称.在我的旧版JADE上,HelloWorldAgent位于examples.hello包中.因此,您应该指定程序参数:-gui testAgent:examples.hello.HelloWorldAgent.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


应用场景 C端用户提交工单、工单创建完成之后、会发布一条工单创建完成的消息事件(异步消息)、MQ消费者收到消息之后、会通知各处理器处理该消息、各处理器处理完后都会发布一条将该工单写入搜索引擎的消息、最终该工单出现在搜索引擎、被工单处理人检索和处理。 事故异常体现 1、异常体现 从工单的流转记录发现、
线程类,设置有一个公共资源 package cn.org.chris.concurrent; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * @Descrip
Java中的数字(带有0前缀和字符串)
在Java 9中使用JLink的目的是什么?
Java Stream API Filter(过滤器)
在Java中找到正数和负数数组元素的数量
Java 9中JShell中的不同启动脚本是什么?
使用Java的位填充错误检测技术
java中string是什么
如何使用Java中的JSON-lib API将Map转换为JSON对象?