You need Ant to compile and run the example presented in the JBoss documentation. Ant is the standard build tool used by most open source Java projects and is widely being used in commercial settings as well. You need Ant version 1.3 or latter. You can download the 1.3 binaries for Ant from HERE. If you have problems finding binaries at that location try the Ant home page which is located HERE.
Once you have the Ant distribution unarchive it to create a jakarta-ant-1.3 directory. The Ant documentation is located in the docs/manual directory. You should start with the docs/manual/index.html file and browse through its contents if you want to use Ant. You won't need to know anything about Ant build scripts in order to compile and run the examples in the JBoss documentation. All we care about at this point is that you have Ant installed and availble in your executation path such that you can run ant from the command line. To do this you need the path to the jakarta-ant-1.3/bin directory in your PATH environment variable(or the equivalent construct for you OS). So for example, I have Ant installed in /usr/local/Java/Ant/jakarta-ant-1.3 and my PATH contains /usr/local/Java/Ant/jakarta-ant-1.3/bin. On a win32 platform with Ant installed in G:/tmp/jakarta-ant-1.3 you would need G:/tmp/jakarta-ant-1.3/bin in your PATH. Setup your PATH now.
You need the bin directory of a 1.3 JDK(Java development kit) in your path as well for access to the java interpreter and java compiler. You also typically need to set the JAVA_HOME environment variable to point to the location of a JDK 1.3 installation so that Ant can find the javac compiler. Your Ant installation may have been configured such that this is not necessary and you can try the following installation test without this set at first.
Test the Ant installation by opening a shell or command prompt. Next create a build.xml file in the current directory that contains the contents listed in the following figure:
Figure 1.1. Ant build.xml script for testing an Ant installation
On a linux system with the build.xml file in /tmp you should see output like: