SREDNY BUITRAGO
SREDNY BUITRAGO

Reputation: 11

Running Hello Agent in JADE

This maybe is an easy thing to resolve, the thing is that I have hours trying to make it work and nothing. I'm trying to compile and run some agents in JADE, basically are the examples available in the tutorial available in the webpage (I think). So, I have a script file to compile the class and other to run the compiled code, The first one I called it CompileJade.bat, and this is the content:

javac -classpath jade.jar;.\lib\jadeTools.jar;.\lib\iiop.jar;.\lib\base64.jar;. %1 %2 %3 %4 %5 %6 %7 %8 %9

The, the RunJade.bat contains these lines:

java -cp jade.jar jade.Boot -gui

Until here, everything seems to work fine, some compiled files are created now. But then, I 'm trying to run my project but none of the agents appears in the container or the tree in the GUI of Jade, then I tried to run the hello agent example but neither this one appear in the container, I only have the ams, df, and rma agents. This is the content of the hello agent class:

 import jade.core.Agent;

 public class HelloAgent extends Agent 
 { 
      protected void setup() 
      { 
            System.out.println("Hello World. ");
            System.out.println("My name is "+ getLocalName()); 
      }
 }

I typed these lines in the windows terminal:

compileJade HelloAgent.java
RunJade MyAgent:HelloAgent

Then the GUI is initialized but I don't have my agent in the container. So, what's wrong?

Upvotes: 0

Views: 1433

Answers (2)

tale.fairy
tale.fairy

Reputation: 1

i think you have to add your package in the class. Alhtough i have another problem regarding this hello agent in jade, the version number 4 does not contain the http.jar, iiop.jar; and base64.jar

Can you please tell me where did you download those files for the 4 version?

Thank you

Upvotes: -1

EyesOfÖzil
EyesOfÖzil

Reputation: 309

The problem may be in in the agent initialization. The statement RunJade MyAgent:HelloAgent needs the package name. The common syntax is <LocalAgentName>:<PackageName>.<ClassName>.

Upvotes: 0

Related Questions