Programmatic Examples Overview

Source code for all the examples in this section may be found in the "samples" subdirectory. The example code contained in this document shows only parts of code that a relevant to the task. Review the source code for a complete code listing.

All of the examples import the MOVEit package.

import com.stdnet.moveit.*;

And then connect to the localhost.

MICentralAPI oAPI = new MICentralAPI();

oAPI.setHost("localhost");
if (! oAPI.connect()) {
	showMsg("Can't connect: " + oAPI.getErrorDescription());
	return;
}

The example classes are subclasses of MICentralAPIJavaDemo. If you would like to run the examples, first compile the source code. Compiling the samples requires the Java SDK, version 1.5 or higher.

From your command line go to the samples directory and enter the command to compile:

javac -cp ..\MICentralAPI.jar *.java

Then enter the command to run an example. To run the ShowRunningTasks example, use:

java -cp .;..\MICentralAPI.jar ShowRunningTasks