Installing MICA

To install MICA, take the tar.gz (where version is the current version) file and use the following commands to unzip it:

% jar xvfz mica-2.0-{version}.jar

This sets up a subdirectory mica-2.0-{version} that contains all the mica files and documentation. You should move into that directory. The next step that needs to be completed is that the classpath must be set up. You should add the following jar files to your classpath (all from the jars directory):

Exactly how you do this depends on your operating system. For example, under Windows, it can be done using (excluding the optional jars, don't forget to include them if you need them):

set CLASSPATH=jars/hsqldb.jar;jars/mica.jar

Under bash (e.g. Linux or MacOS) it might be:

export CLASSPATH=jars/hsqldb.jar:jars/mica.jar

Once you have set up the classpath, you can now start the MicaRunner. MicaRunner is a graphical user interface that allows the blackboard and the agents to be started independently. A picture of the MicaRunner is shown in figure Figure 3.1.

MicaRunner window

Figure 3.1. MicaRunner window


MicaRunner takes a file that tells it which agents it should load. In this particular case, in the mica directory, a file called sharedpad-run.xml specifies which agents to load. MicaRunner can be run by typing:

% java unsw.cse.mica.runner.MicaRunner examples/run/sharedpad-run.xml

Once loaded, hit the "Start all" button to start the agents. You should now see a total of three windows (they may actually be overlapping, so move them as appropriate). For the moment, put the "Mica Blackboard Display" window aside, and just move the Shared Pad windows into a convenient place. Drawing in one window should lead to lines appearing in the opposite window and vice versa. In this case, both of the SharedPad windows are clients that connect to the blackboard. When you drag the mouse in either window, then the client creates a mob with a description of the line and writes it to the blackboard. Since SharedPad clients register their interests in lines, both clients are informed of the newly added line and draw it on their canvases. If you now look at the "Mica Blackboard Display" window, and click on the "MICA Objects" node, there is a complete list of all the Mobs that have been written on the blackboard.