In previous posting i wrote about ejip. I use eclipse 3.2 to use jade platform but i didn’t use ejip in my programming :D

I can create my first agent using jade. I have install eclipse 3.2 and jdk 1.4. and prepare jade before running it. This step by step using jade in eclipse:

  • Open eclipse 3.2
  • Create new project, i create project with yuhana_agent as name
  • Create new package, i give it name : indoorNav
  • Import all jade library:
    • right click on project name, choose property
    • choose libraries tab and press button “Add External JARS”, and select all jade libraries and click OK
    • choose Order and Export Tab, make sure all libraries are checked.
    • click OK
  • Create new class give HelloWorld.class for a name and write the code like this code :

                  package indoorNav;

 

 

                  import jade.core.Agent;

                  public class HelloWorld extends Agent{

                                  public void setup(){    

                                         System.out.println(“Hello Yuhana, my name is : “ +getAID().getName());

                                   }

                        }

 

 

  • Open Run Dialog by right click on project, choose Run As and choose Open Run Dialog. Give name MyFirstAgent for name of Run Configuration. In Main Tab, choose project name, write jade.Boot as main class and don’t forget to check checkbox include system libraries when searching for main class.  See figure 1.

setup jade main class

Figure 1. Main Class Setting

  • For next step choose (x)=Argument Tab, write -gui <main_class_name> <nickname>:<package_name>.<class_name> in program argument Tab. Example: i give yuhana as nickname, indoorNav as package and HelloWorld as class, so write -gui jade.Boot yuhana:indoorNav.HelloWorld on program argument as shown in figure 2.

argument-setting.jpg

Figure 2. Argument Setting

  • Run the program, see the result in figure 3 and RMA agent dialog appear as shown in figure 4. If program succes our new agent appear in this dialog. There are 3 default agent (RMA, ams and da agent). See agent yuhana appear in that figure.

hello.jpg

Figure 3. Result of the program in console

 

agent-dialog.jpg

Figure 4. Agent Dialog

 

How to do programming in Jade, please visit this

another related resources : http://agents.cs.bath.ac.uk/cm30174/jade/ and http://mia.ece.uic.edu/~papers/MediaBot/CLOntoSupport.pdf