我是 JADE 的新手,在加载代理时遇到了一些麻烦。
我创建了一个新的 IntelliJ 项目,并在“依赖项”中添加了“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,但同样没有运气。任何帮助将非常感激。
非常感谢
担