house fly

JSwat Project

How to Build JSwat


Building Explained

The term "building" is used to mean creating the binary or source distribution of the JSwat application. This is done using the Jakarta Ant tool maintained by the Apache group. This Java tool makes building a JSwat distribution very easy. Ant uses a file called build.xml to determine what actions are to be taken when making a build package. The JSwat project has such a file specifically written to be used with Ant.

Making the Build

Building a JSwat binary or source package with Ant is very straight-forward. First, download and install Ant, which again is very easy. Next, invoke Ant from the directory containing the JSwat build.xml file, like so:

% ant

This will run the default target which should make the source and binary packages. This generates .tar.gz files and leaves them in the directory containing the build.xml file.

Afterwards you should invoke Ant with the clean target so that it removes the temporary file files and directories.

Using jmake.pl After Building

Because part of the JSwat build process leaves the entire set of source files copied in a subdirectory called srcdist, you will want to clean the directory before running jmake.pl again, if you happen to use that script. This is easily done by invoking Ant with the clean target.

Testing the Build

Testing the build is pretty straightforward. Extract the .jar file from the archive created during the build process described above, then start JSwat using a command line like the one shown below:

% java -jar jswat.jar

This should launch JSwat from the classes contained in the jar file. The general idea is to make sure the jar file contains all the necessary classes and resource bundles. If any errors occur you may want to check that the build.xml contains all of the necessary files for JSwat to run properly.



Back