INSTALLfile for instructions on building ANTS.
Before you start using ANTS, you'll need to make sure your JVM and basic
libraries are configured correctly. There is a shell script in
the scripts directory
sanitycheck that will make sure
your JVM works, and that the Java NodeOS and basic ANTS startup
class are visible in the classpath. If it fails, make sure that
the emuJanosVM jar,
the Janos Java NodeOS jar, and the ANTS jar are in your classpath.
antsvm is created in the
directory that will setup the classpath correctly. To use it
during the sanitycheck script, set the JVM environment variable to
the full path to the antsvm script. For example:
(Note that the JVM defaults to
env JVM=/path/to/ants/bin/antsvm ./sanitycheck
There are two simple interfaces for starting ANTS nodes,
ConfigurationManager starts a node based on a text configuration file (see the *.config files in the scripts directory). The configuration file can describe an entire network of machines, so the ConfigurationManager command takes a node address which is used to pick a single node's information out of the file.
NodeConfigure can start a node without as many configuration file dependencies (though you'll still need a file for routing information and for starting complicated applications).
For either one, the javadoc (or source) includes pertinent
details. All of the examples in the scripts directory use the
ConfigurationManager, while the regression tests tend to use
While there is no "User's Manual" for ANTS, there are
several sources of information about Programming for ANTS.
nodesetup.shscript in the scripts directory. Then you can leverage the multiple xterms and JVM cleanup code from that script.
Both the ANTS code and the (debugging version of the) Janos Java
NodeOS code are littered with "trace" calls. Traces can be turned
on at runtime through a system property. For ANTS, the system
ants.debugFlags. The value for the
property should be a comma-separated list of trace flags (listed
below). The most convenient way to specify a system property is
via the JVM's command line argument -D, like this:
The set of flags that are available is defined in
java -Dants.debugFlags=ALL edu.utah.janos.nodeos.Main ants.core....
ants/src/core/Trace.javaand consists of
In addition to the flags at the ANTS level, the Java NodeOS has a
similar selection of flags. NodeOS flags are set with the
janos.debugFlags property. The available flags for
the NodeOS are defined in the class
edu.utah.janos.nodeos.Trace and are:
-private. See the script
Some ANTS coding conventions are spelled out in the file CodeStyle.txt.
Addtionally, there is a description of the ANTS2 security architecture, and a brief overview of how "IDs" are used in the ANTS core ( On_IDs.txt).
Finally, ANTS2 is based on the Janos Java NodeOS so if you're hacking ANTS you will probably want to get the sources to the Java NodeOS (available at the Janos web pages).