Java Reference
In-Depth Information
To compile the topics 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 topics examples, you are ready to execute them.
Executing the Examples
Some of the recipes require third-party JARs to run. All of the JARs necessary to run
the examples are contained in the companion download. However, these JARs must be in
your
classpath
for the examples to run. To make this easier, there is a file named
recipe.bat
contained in the root directory of the
HTTPRecipes
directory. You can
use it to run the examples. For example, to run the
GetCityTime
example from Chapter
3, you would use the following command:
recipe com.heatonresearch.httprecipes.ch3.recipe3.GetCityTime
Once you execute the above command, you should see Figure B.9.