14.9. Building and Running the JAXB Example

Listing 14.13 shows the build.xml file for the JAXB example. In order to build the JAXB example, you'll need to alter the JAXB_HOME property to the location where you've installed the early-access release. Because of changes being made to the JAXB implementation, the example code here will not work as written with future releases of JAXB.

The default <build> target will run the xjc compiler to generate classes from the standings.dtd file, and then compile those classes as well as the source for our example program. The <test> target will invoke our example, which utilizes the xjc-generated classes.

Listing 14.13. build.xml From jaxb Directory
 <project name="jaxb" default="build" basedir="."> <property ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.