How to make Mobile Agents
@
Ichiro Satoh (National Institute of Informatics)

 

In the MobileSpaces system, a mobile agent is created and marshalled as a Jar file format. When you make your mobile agnet, please Please input the following command.

jar -cvfM AgentName.jar classpath1 classpaht2 ,..., classpasthN

where "AgentName.jar" is the filename of the agent and "classpath1,...,classpathN" are the file names of the classes that the agent consists of.

For example, please assume that an editor agent consists of editor/Editor.class and editor/EditorDialog.class, you should execute the following command to make the agent from these classes.

jar -cvfM Editor.jar editor/Editor.class editor/EditorDialog.class

Also, when a mobile agent is marshalled into a secondary storage or tranfered over network, the MobileSpaces runtime system transforms the agent into a bit-stream in Jar-file format.