Java Reference
In-Depth Information
Figure D.6: 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 needed 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.sh 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.sh com.heatonresearch.httprecipes.ch3.recipe3.GetCityTime
If you get a permissions error, you may have to enable the execution privilege on the
recipe.sh command. To do this, execute the following command:
chmod +x recipe.sh
Once you execute the above command, you should see Figure D.7.
Search WWH ::




Custom Search