Compiling the Examples
Apache Ant is used to compile the examples from this book. The examples are contained in a directory named “HTTPRecipes”. You get this directory from the ZIP file you downloaded that contains the examples. For more information on how to obtain the examples from this book, refer to Appendix A.
The examples shown here use the HTTPRecipes directory located at c:\HTTPRecipes. You can see the contents of this directory in Figure B.7.
Figure B.7: The Book’s Examples

Each of these files and directories serve a specific purpose, which is listed in Table B.1.
Table B.1: Contents of the HTTP Recipes Companion Download
| Name | Purpose |
|---|---|
| .settings | Settings used by Eclipse. |
| com | Source code for all of the book examples. |
| Dist | The distribution directory, contains the JAR file. |
| Jar | Contains all of the JAR files needed to compile the examples. |
| www | Source code for the AXIS web services interface stubs. |
| .classpath | The Eclipse classpath. |
| .project | The Eclipse project file. |
| build.xml | The Apache Ant build script. |
| recipe.bat | Used to run the recipes with the correct classpath. |
To compile the book’s examples, move to the HTTPRecipes directory and execute the following command:
ant
You will now see Figure B.8.
Figure B.8: Successful Build

Now that you have compiled the book’s examples, you are ready to execute them.




