xjc Command Line Usage

xjc Command Line Usage

Prerequisites

  • xvisitor-plugin-0.1.0.jar somewhere on your disk

  • A stand-alone installation of the JAXB reference implementation, version 2.2 or higher.

Custom xjc plugins do not work with the xjc version distributed with Oracle's JDK, which contains a copy of the JAXB RI with modified package names.

Invoking xjc

xjc.sh -classpath /path/to/xvisitor-plugin-0.1.0.jar -Xvisitor -Xvisitor-package:com.acme.myschema.jaxb [other xjc options] myschema.xsd

The -classpath and -Xvisitor options are mandatory to specify the location of the xvisitor-plugin JAR and to enable the plugin. With the optional -Xvisitor-package option, you can specify the package name for the generated visitor classes.