Skip to main content
Jump to: navigation, search


< EclipseLink‎ | Examples‎ | MOXy‎ | JAXB


The JAXB Compiler can be used to generate Java classes from an XML schema. The resulting classes contain JAXB annotations that represent the XML binding metadata.

Running the JAXB Compiler

The JAXB compiler can be run to generate JAXB-annotated Java classes from an XML Schema:

<ECLIPSELINK_HOME>/eclipselink/bin/ <source-file.xsd> [-options]
<ECLIPSELINK_HOME>\eclipselink\bin\jaxb-compiler.cmd <source-file.xsd> [-options]
Options include:
   -d <dir>                     Specifies the output directory for generated files
   -p <pkg>                     Specifies the target package
   -classpath <arg>             Specifies where to find user class files
   -verbose                     Enable verbose output
   -quiet                       Suppress compiler output
   -version                     Display version information
For a complete list of compiler options: -help
Example: -d jaxb-compiler-output config/Customer.xsd

Back to the top