小第毕设做有关多Agent通信研究。第一次接触JADE,但出现一个问题一直解决不了,我是利用的是netbeans5.0写的java程序,jade是3.4版本,源程序如下: 运行时,会弹出jade rma运行窗口,但netbeans下面的输出框中没有打印出结果信息。
并且出现下面这个错误 :"严重: Cannot create agent hello: Class jadetest.HelloWorldAgent for agent ( agent-identifier :name hello@yourcomputer:1099/JADE ) not found [nested java.lang.ClassNotFoundException: jadetest.HelloWorldAgent]"到底是什么原因? netbeans和jade3.4我已经绑定了,希望知晓者来帮帮忙!!!
import jade.core.*;
public class HelloWorldAgent extends Agent{
public void setup(){
System.out.println("Agent Started: Hello World!");
System.out.println("-----About Me:-----");
System.out.println("My local name is:"+getLocalName());
System.out.println("My globally unique name is:"+getName() );
System.out.println("-----About Here:-----");
Location l = here();
System.out.println("I am running in a location called:"+l.getName());
System.out.println("Which is identified uniquely as:"+l.getID());
System.out.println("And is contactable at:"+l.getAddress());
System.out.println("Using the protocol:"+l.getProtocol());
}
}
下面是运行得出的一些信息:
init:deps-jar:compile:run:2007-4-8 20:45:57 jade.core.Runtime beginContainer信息: ---------------------------------- This is JADE 3.4.1 - revision 5912 of 2006/11/16 13:09:18 downloaded in Open Source, under LGPL restrictions, at http://jade.tilab.com/----------------------------------------2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.management.AgentManagement initialized2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.messaging.Messaging initialized2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.mobility.AgentMobility initialized2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.event.Notification initialized2007-4-8 20:45:59 jade.mtp.http.HTTPServer <init>信息: HTTP-MTP Using XML parser org.apache.crimson.parser.XMLReaderImpl2007-4-8 20:45:59 jade.core.messaging.MessagingService boot信息: MTP addresses:http://yourcomputer:7778/acc2007-4-8 20:45:59 jade.core.AgentContainerImpl startBootstrapAgents严重: Cannot create agent hello: Class jadetest.HelloWorldAgent for agent ( agent-identifier :name hello@yourcomputer:1099/JADE ) not found [nested java.lang.ClassNotFoundException: jadetest.HelloWorldAgent]2007-4-8 20:45:59 jade.core.AgentContainerImpl joinPlatform信息: --------------------------------------Agent container Main-Container@JADE-IMTP://yourcomputer is ready.--------------------------------------------
并且出现下面这个错误 :"严重: Cannot create agent hello: Class jadetest.HelloWorldAgent for agent ( agent-identifier :name hello@yourcomputer:1099/JADE ) not found [nested java.lang.ClassNotFoundException: jadetest.HelloWorldAgent]"到底是什么原因? netbeans和jade3.4我已经绑定了,希望知晓者来帮帮忙!!!
import jade.core.*;
public class HelloWorldAgent extends Agent{
public void setup(){
System.out.println("Agent Started: Hello World!");
System.out.println("-----About Me:-----");
System.out.println("My local name is:"+getLocalName());
System.out.println("My globally unique name is:"+getName() );
System.out.println("-----About Here:-----");
Location l = here();
System.out.println("I am running in a location called:"+l.getName());
System.out.println("Which is identified uniquely as:"+l.getID());
System.out.println("And is contactable at:"+l.getAddress());
System.out.println("Using the protocol:"+l.getProtocol());
}
}
下面是运行得出的一些信息:
init:deps-jar:compile:run:2007-4-8 20:45:57 jade.core.Runtime beginContainer信息: ---------------------------------- This is JADE 3.4.1 - revision 5912 of 2006/11/16 13:09:18 downloaded in Open Source, under LGPL restrictions, at http://jade.tilab.com/----------------------------------------2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.management.AgentManagement initialized2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.messaging.Messaging initialized2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.mobility.AgentMobility initialized2007-4-8 20:45:59 jade.core.BaseService init信息: Service jade.core.event.Notification initialized2007-4-8 20:45:59 jade.mtp.http.HTTPServer <init>信息: HTTP-MTP Using XML parser org.apache.crimson.parser.XMLReaderImpl2007-4-8 20:45:59 jade.core.messaging.MessagingService boot信息: MTP addresses:http://yourcomputer:7778/acc2007-4-8 20:45:59 jade.core.AgentContainerImpl startBootstrapAgents严重: Cannot create agent hello: Class jadetest.HelloWorldAgent for agent ( agent-identifier :name hello@yourcomputer:1099/JADE ) not found [nested java.lang.ClassNotFoundException: jadetest.HelloWorldAgent]2007-4-8 20:45:59 jade.core.AgentContainerImpl joinPlatform信息: --------------------------------------Agent container Main-Container@JADE-IMTP://yourcomputer is ready.--------------------------------------------
解决方案 »
- 求助,图书管理系统
- 日历面版控件(WINDOWS标准样式),可嵌入各种面版中,跟据大小自动调节
- java中将数据库的数据以txt文件保存
- hibernate中的id,我想自己set,不想让hibernate自动生成,怎么做???
- 关于:java.net.SocketException: Connection reset
- 《最新java2核心技术卷Ⅰ原理》书中源代码哪有下载? 100分
- java解释执行出错,朋友们快来帮忙
- 怎么读取文件纯文字信息??
- jbuilder5的中文问题
- 怎么样阻止一个窗口给关掉?
- 为什么从内部类中访问局部变量需要被声明为最终类型
- 如何让 JDialog 运行起来 (代码如下) 哪里不对,请帮忙
在rma中创建Agent时,在class窗口填写你这个类所在的完整包名
package为examples.hello
则class窗口需要填入examples.hello.helloWorldAGent
-gui hello:src.HelloWorldBehaviours
就可以了