10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

JAXB Examples<br />

502<br />

-extension By default, the XJC binding compiler strictly enforces the rules outlined<br />

in the Compatibility chapter of the JAXB Specification. In the default<br />

(strict) mode, you are also limited to using only the binding<br />

customizations defined in the specification. By using the -extension<br />

switch, you will be allowed to use the JAXB Vendor Extensions.<br />

-b file Specify one or more external binding files to process. (Each binding file<br />

must have its own -b switch.) <strong>The</strong> syntax of the external binding files is<br />

extremely flexible. You may have a single binding file that contains<br />

customizations for multiple schemas or you can break the<br />

customizations into multiple bindings files. In addition, the ordering of<br />

the schema files and binding files on the command line does not matter.<br />

-d dir By default, xjc will generate <strong>Java</strong> content classes in the current directory.<br />

Use this option to specify an alternate output directory. <strong>The</strong> directory<br />

must already exist; xjc will not create it for you.<br />

-p package Specify an alternate output directory. By default, the XJC binding<br />

compiler will generate the <strong>Java</strong> content classes in the current directory.<br />

<strong>The</strong> output directory must already exist; the XJC binding compiler will<br />

not create it for you.<br />

-proxy proxy Specify the HTTP/HTTPS proxy. <strong>The</strong> format is<br />

[user[:password]@]proxyHost[:proxyPort]. <strong>The</strong> old -host and -port<br />

options are still supported by the Reference Implementation for<br />

backwards compatibility, but they have been deprecated.<br />

-classpath arg Specify where to find client application class files used by the<br />

and customizations.<br />

-catalog file Specify catalog files to resolve external entity references. Supports<br />

TR9401, XCatalog, and OASIS XML Catalog format. For more<br />

information, see the XML Entity and URI Resolvers document or<br />

examine the catalog-resolver sample application.<br />

-readOnly Force the XJC binding compiler to mark the generated <strong>Java</strong> sources<br />

read-only. By default, the XJC binding compiler does not write-protect<br />

the <strong>Java</strong> source files it generates.<br />

-npa Suppress the generation of package level annotations into<br />

**/package-info.java. Using this switch causes the generated code to<br />

internalize those annotations into the other generated classes.<br />

-xmlschema Treat input schemas as W3C XML Schema (default). If you do not<br />

specify this switch, your input schemas will be treated as W3C XML<br />

Schema.<br />

-quiet Suppress compiler output, such as progress information and warnings.<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!