Building ANTS 2.0 ----------------- You will need a java compiler (javac or jikes) in your path. For Jikes and older versions of javac, you must provide a classpath via the --with-classpath= argument to configure. The short version of the instructions is: % ./configure % make all Useful configure options include: --prefix: the install prefix. (Generated jar files are put in ${prefix}/share/java/classes/.) --disable-debug: Turn off javac debugging flags (on by default) --enable-optimized: Turn on javac optimization flags --with-jnodeos=: Use the specified Janos Java NodeOS (defaults to the appropriate one included in lib/) --with-jvmulation=: Use the specific JanosVM emulation library (defaults to the one included in lib/) --with-classpath=: Set a classpath to compile ANTS against. (defaults to nothing) If you want to pass any other arguments to the java compiler, the JAVACFLAGS variable will do that (for make or configure). E.g., to pass "+E" (useful if you're using emacs and jikes): env JAVACFLAGS=+E ./configure or make all JAVACFLAGS=+E The standard targets 'clean', 'all', 'distclean', 'install', and 'TAGS' all work as you might expect. Troubleshooting the Compile --------------------------- If you see this error from jikes when compiling: *** Error: Could not find package named: /home/me/src/ants/lib/jnodeos-debug.zip(java/util) or /home/me/src/ants/src/java/util You need to set the classpath via --with-classpath to configure (or JAVAC_CLASSPATH on the make command line) to point to a jar or zip containing the basic Java classes (java.lang.*, java.util.*, etc.). If you see this error from JDK1.1.x javac when compiling: src/ants/core/ANEPDemultiplexKey.java:35: Superclass java.lang.Object of class <...> not found you need to set the JAVAC classpath (as above for jikes). If you see errors about "blank final field may not be initialized", rest assured that it is initialized and that your compiler is lame. Upgrade to at least JDK1.2's javac or use jikes to compile the code. (Alternatively, you could just comment out the 'final' modifier on all of the offending fields and recompile.) Running ANTS ------------ Because ANTS2 requires the Janos Java NodeOS, the initial classpath for starting up ANTS can be complex. A script 'antsvm' is generated in your object tree that sets up the classpath to include all the required jar files. There is a simple script in the scripts/ directory called 'sanitycheck' that will run a set of simple sanity checks to make sure your JVM is in your path, with the appropriate archives in the classpath. In addition, there are a number of example scripts in the scripts/ directory that end with ".start". These will start up a number of ANTS nodes on the local host and run one of the sample applications. For example, the ping.start script will open two xterms running ANTS nodes and send a ping packet through the routers. Using A Local Janos Java NodeOS ------------------------------- The ANTS distribution includes a copy of the Janos Java NodeOS class files. A different Janos Java NodeOS can be specified by the --with-jnodeos= argument to configure. The Janos Java source can be obtained from the Janos project at: http://www.cs.utah.edu/flux/janos/ Follow the instructions for downloading, installing and building the Janos Java NodeOS. Use the installed jnodeos JAR file in the argument to --with-jnodeos= for the ANTS configure.