JADE on MicroEJ Studio


#1

Hi everyone,

I want to use JADE on MicroEJ Studio.
First, I set the MicroEJ Studio and working environment up and I am able to run com.microej.demo.hello sample project (which is shared in applications-3.0.0.zip) on both simulator and STM32F746-Disco.
Now, I want to run hello world example of JADE in com.microej.demo.hello project. Therefore, I imported the jade.jar and added HelloWorldAgent.java into the project. Even I have never instantiated the HelloWorldAgent class in HelloActivity, I faced up errors.

HelloWorldAgent has a setup method and just prints agentID to the console. Shown as below:

package com.microej.demo.hello;

import jade.core.Agent;

/**
   This example shows a minimal agent that just prints "Hello World!" 
   and then terminates.
   @author Giovanni Caire - TILAB
 */
public class HelloWorldAgent extends Agent {

  protected void setup() {
  	System.out.println("Hello World! My name is " + getLocalName());
  	
  	// Make this agent terminate
  	doDelete();
  } 
}

Are there anybody to help?
Thanks in advance.


#2

Hi,

What are the errors you encounter? compilation errors?

How did you add your classpath dependency for JADE? you said you imported the .jar file. For a MicroEJ Sandboxed Application you need to drop the jar into the META-INF/libraries folder at the root of your Eclipse project for it to be be taken into account at compile time and run time.

Moreover JADE seems to be using java.io.ObjectOutputStream [1] that is not available in our runtime yet.

Hope it’ll help.
Gaëtan for MicroEJ

[1] https://docs.oracle.com/javase/7/docs/api/java/io/ObjectOutputStream.html