|
Download
FAQ History |
|
API
Search Feedback |
Building the Examples
Most of the examples in the Java WSDP are distributed with a build file for Ant, a portable build tool contained in the Java WSDP. For information about Ant, visit
http://ant.apache.org/. Directions for building the examples are provided in each chapter. Most of the tutorial examples in the J2EE Tutorial are distributed with a configuration file forasant, a portable build tool contained in the Application Server. This tool is an extension of the Ant tool developed by the Apache Software Foundation (http://ant.apache.org). Theasantutility contains additional tasks that invoke the Application Server administration utilityasadmin. Directions for building the examples are provided in each chapter.To run the
asantscripts in the J2EE Tutorial, you must set two common build properties as follows:
- Set the
j2ee.homeproperty in the file<INSTALL>/j2eetutorial14/examples/common/build.propertiesto the location of your Application Server installation. The build process uses thej2ee.homeproperty to include the libraries in<J2EE_HOME>/lib/in the classpath. All examples that run on the Application Server include the J2EE library archive--<J2EE_HOME>/lib/j2ee.jar--in the build classpath. Some examples use additional libraries in<J2EE_HOME>/lib/and<J2EE_HOME>/lib/endorsed/; the required libraries are enumerated in the individual technology chapters. <J2EE_HOME> refers to the directory where you have installed the Application Server or the J2EE 1.4 SDK.
Note: On Windows, you must escape any backslashes in the
j2ee.homeproperty with another backslash or use forward slashes as a path separator. So, if your Application Server installation isC:\Sun\AppServer, you must setj2ee.homeas follows:j2ee.home = C:\\Sun\\AppServerorj2ee.home=C:/Sun/AppServer
- If you did not use port 8080 when you installed the Application Server, set the value of the
domain.resources.portproperty in<INSTALL>/j2eetutorial14/examples/common/build.propertiesto the correct port.- Set the
admin.userandadmin.passwordproperties in the file<INSTALL>/j2eetutorial14/examples/common/build.propertiesto the values you specified when you installed the J2EE 1.4 Application Server. The build scripts use these values when you invoke an administration task such as creating a database pool. The default value foradmin.useris set to the installer's default value, which isadmin.In order to run the Ant scripts, you must configure your environment and properties files as follows:
- Add the
bindirectory of your J2SE SDK installation to the front of your path.- Add
<JWSDP_HOME>/jwsdp-shared/binto the front of your path so the Java WSDP 1.4 scripts that are shared by multiple components override other installations.- Add
<JWSDP_HOME>/apache-ant/binto the front of your path so that the Java WSDP 1.4 Ant script overrides other installations.
|
Download
FAQ History |
|
API
Search Feedback |
All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.