xjc.1 revision 0
4880N/A.'" t
0N/A." Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
0N/A." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A."
0N/A." This code is free software; you can redistribute it and/or modify it
0N/A." under the terms of the GNU General Public License version 2 only, as
0N/A." published by the Free Software Foundation.
0N/A."
0N/A." This code is distributed in the hope that it will be useful, but WITHOUT
0N/A." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A." version 2 for more details (a copy is included in the LICENSE file that
0N/A." accompanied this code).
0N/A."
0N/A." You should have received a copy of the GNU General Public License version
0N/A." 2 along with this work; if not, write to the Free Software Foundation,
0N/A." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2362N/A."
2362N/A." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
2362N/A." CA 95054 USA or visit www.sun.com if you need additional information or
1178N/A." have any questions.
4880N/A." `
0N/A.TH xjc 1 "07 Aug 2006"
0N/A." Generated by html2man
1178N/A
0N/A.LP
0N/A.ad c
0N/A.SH NAME
0N/Axjc \- Java(TM) Architecture for XML Binding
4176N/A.br
0N/ABinding Compiler \f3Specification Version:\fP 2.0
0N/A.br
0N/A\f3Reference Implementation (RI) Version:\fP 2.0 ea3
0N/A.br
0N/A.ad l
0N/A
0N/A.LP
0N/A.SH "Launching xjc"
0N/A.LP
0N/A.LP
0N/AThe binding compiler can be launched using the appropriate \f2xjc\fP shell script in the \f2bin\fP directory for your platform. We also provide an Ant task to run the binding complier \- see the instructions for using xjc with Ant.
0N/A.LP
0N/A.RS 3
0N/A
0N/A.LP
0N/A\f3For Solaris/Linux\fP
0N/A.LP
0N/A.RS 3
0N/A
0N/A.LP
0N/A.LP
0N/A\f2% /path/to/jaxb/bin/xjc.sh \-help\fP
0N/A.LP
4176N/A.RE
0N/A\f3For WindowsNT/2000/XP\fP
0N/A.LP
0N/A.RS 3
0N/A
4176N/A.LP
0N/A.LP
0N/A\f2> c:\\path\\to\\jaxb\\bin\\xjc.bat \-help\fP
0N/A.LP
0N/A.RE
0N/A.RE
0N/A.RS 3
0N/A
0N/A.LP
0N/A\f3Output\fP
0N/A.LP
0N/A.RS 3
0N/A
0N/A.LP
0N/A.nf
0N/A\f3
0N/A.fl
0N/AUsage: xjc [\-options ...] <schema_file/URL/dir> ... [\-b <bindinfo>] ...
0N/A.fl
0N/AOptions:
0N/A.fl
0N/A \-nv : do not perform strict validation of the input schema(s)
0N/A.fl
0N/A \-extension : allow vendor extensions \- do not strictly follow the
0N/A.fl
0N/A Compatibility Rules and App E.2 from the JAXB Spec
0N/A.fl
0N/A \-b <file> : specify external bindings files (each <file> must have its own \-b)
0N/A.fl
0N/A \-d <dir> : generated files will go into this directory
0N/A.fl
0N/A \-p <pkg> : specifies the target package
0N/A.fl
0N/A \-httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
0N/A.fl
0N/A \-httpproxyfile <file>: set the proxy string (same format as above).
0N/A.fl
0N/A \-classpath <arg> : specify where to find user class files
0N/A.fl
0N/A \-catalog <file> : specify catalog files to resolve external entity references
0N/A.fl
0N/A support TR9401, XCatalog, and OASIS XML Catalog format.
0N/A.fl
0N/A \-readOnly : generated files will be in read\-only mode
0N/A.fl
0N/A \-npa : suppress generation of package level annotations (**/package\-info.java)
0N/A.fl
0N/A \-xmlschema : treat input as W3C XML Schema (default)
0N/A.fl
0N/A \-relaxng : treat input as RELAX NG (experimental,unsupported)
4176N/A.fl
0N/A \-relaxng\-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
0N/A.fl
0N/A \-dtd : treat input as XML DTD (experimental,unsupported)
0N/A.fl
0N/A \-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
0N/A.fl
0N/A \-verbose : be extra verbose
0N/A.fl
0N/A \-quiet : suppress compiler output
0N/A.fl
0N/A \-help : display this help message
0N/A.fl
0N/A \-version : display version information
0N/A.fl
0N/A\fP
4176N/A.fi
4176N/A.RE
0N/A
0N/A.LP
0N/A.RE
0N/A.RS 3
0N/A
0N/A.LP
0N/A\f3Execute the jaxb\-xjc.jar JAR File\fP
0N/A.LP
0N/A.RS 3
0N/A
0N/A.LP
0N/A.LP
0N/AIf all else fails, you should be able to execute the \f2jaxb\-xjc.jar\fP file:
0N/A.LP
0N/A.RS 3
0N/A
0N/A.LP
2509N/A.RS 3
2509N/A.TP 3
2509N/AFor Solaris/Linux:
0N/A\f2% java \-jar $JAXB_HOME/lib/jaxb\-xjc.jar \-help\fP
4176N/A.TP 3
4176N/AFor Windows:
0N/A\f2> java \-jar %JAXB_HOME%\\lib\\jaxb\-xjc.jar \-help\fP
0N/A.RE
0N/A
0N/A.LP
0N/A.RE
0N/A.LP
4176N/AThis is equivalent of running "xjc.sh" or "xjc.bat", and it allows you to set the JVM parameters.
4176N/A.LP
0N/A.RE
0N/A.RE
0N/A.SH "OPTIONS"
0N/A.LP
1178N/A
0N/A.LP
0N/A.RS 3
0N/A.TP 3
1178N/A\-nv
0N/ABy default, the XJC binding compiler performs strict validation of the source schema before processing it. Use this option to disable strict schema validation. This does not mean that the binding compiler will not perform any validation, it simply means that it will perform less\-strict validation.
4176N/A.TP 3
1178N/A\-extension
1178N/ABy default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification. Appendix E.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1.0. In some cases, you may be allowed to use them in the "\-extension" mode enabled by this switch. In the default (strict) mode, you are also limited to using only the binding customizations defined in the specification. By using the "\-extension" switch, you will be allowed to use the JAXB Vendor Extensions.
0N/A.TP 3
0N/A\-b <file>
0N/ASpecify one or more external binding files to process. (Each binding file must have it's own \f2"\-b"\fP switch.) The syntax of the external binding files is extremely flexible. You may have a single binding file that contains customizations for multiple schemas or you can break the customizations into multiple bindings files:
1178N/A.RS 3
0N/A
0N/A.LP
0N/A\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings123.xjb\fP
0N/A.br
0N/A\f2xjc schema1.xsd schema2.xsd schema3.xsd \-b bindings1.xjb \-b bindings2.xjb \-b bindings3.xjb\fP
0N/A.RE
0N/AIn addition, the ordering of the schema files and binding files on the command line does not matter.
0N/A.TP 3
0N/A\-d <dir>
4176N/ABy default, the XJC binding compiler will generate the Java content classes in the current directory. Use this option to specify an alternate output directory. The output directory must already exist, the XJC binding compiler will not create it for you.
4176N/A.TP 3
4176N/A\-p <pkg>
4176N/ASpecifying a target package via this command\-line option overrides any binding customization for package name and the default package name algorithm defined in the specification.
4176N/A.TP 3
4176N/A\-httpproxy <proxy>
4176N/ASpecify the HTTP/HTTPS proxy. The format is [user[:password]@]proxyHost[:proxyPort]. The old \f2\-host\fP and \f2\-port\fP are still supported by the RI for backwards compatibility, but they have been deprecated. Note that the password specified with this option is an argument that is visible to other users who use the \f2top\fP command, for example. For greater security, use \f2\-httpproxyfile\fP, below.
4176N/A.TP 3
4176N/A\-httpproxyfile <file>
4176N/ASpecify the HTTP/HTTPS proxy using a file. Same format as above, but the password specified in the file is not visible to other users.
4176N/A.TP 3
4176N/A\-classpath <arg>
4176N/ASpecify where to find client application class files used by the \f2<jxb:javaType>\fP and \f2<xjc:superClass>\fP customizations.
4176N/A.TP 3
4176N/A\-catalog <file>
4176N/ASpecify catalog files to resolve external entity references. Supports TR9401, XCatalog, and OASIS XML Catalog format. Please read the XML Entity and URI Resolvers document or the \f2catalog\-resolver\fP sample application.
4176N/A.TP 3
4176N/A\-readOnly
0N/ABy default, the XJC binding compiler does not write\-protect the Java source files it generates. Use this option to force the XJC binding compiler to mark the generated Java sources read\-only.
0N/A.TP 3
0N/A\-npa
4880N/ASupress the generation of package level annotations into **/package\-info.java. Using this switch causes the generated code to internalize those annotations into the other generated classes.
4176N/A.TP 3
0N/A\-xmlschema
0N/Atreat input schemas as W3C XML Schema (default). If you do not specify this switch, your input schemas will be treated as W3C XML Schema.
0N/A.TP 3
0N/A\-relaxng
4176N/ATreat input schemas as RELAX NG (experimental, unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.
4176N/A.TP 3
0N/A\-relaxng\-compact
0N/ATreat input schemas as RELAX NG compact syntax(experimental, unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.
0N/A.TP 3
0N/A\-dtd
0N/ATreat input schemas as XML DTD (experimental, unsupported). Support for RELAX NG schemas is provided as a JAXB Vendor Extension.
0N/A.TP 3
0N/A\-wsdl
0N/ATreat input as WSDL and compile schemas inside it (experimental,unsupported).
0N/A.TP 3
4176N/A\-quiet
4176N/ASuppress compiler output, such as progress information and warnings..
0N/A.TP 3
0N/A\-verbose
4176N/ABe extra verbose, such as printing informational messages or displaying stack traces upon some errors..
0N/A.TP 3
0N/A\-help
0N/ADisplay a brief summary of the compiler switches.
0N/A.TP 3
0N/A\-version
0N/ADisplay the compiler version information.
4176N/A.TP 3
4176N/A<schema file/URL/dir>
0N/ASpecify one or more schema files to compile. If you specify a directory, then xjc will scan it for all schema files and compile them.
0N/A.RE
4176N/A.SS
4176N/ASummary of Deprecated and Removed Command Line Options
4176N/A.LP
4176N/A.RS 3
4176N/A
4176N/A.LP
4176N/A.RS 3
4176N/A.TP 3
4176N/A\-host & \-port
4176N/AThese options have been deprecated and replaced with the \f3\-httpproxy\fP option. For backwards compatibility, we will continue to support these options, but they will no longer be documented and may be removed from future releases.
4176N/A.TP 3
4176N/A\-use\-runtime
4176N/ASince the JAXB 2.0 specification has defined a portable runtime, it is no longer necessary for the JAXB RI to generate **/impl/runtime packages. Therefore, this switch is obsolete and has been removed.
0N/A.TP 3
0N/A\-source
0N/AThe \-source compatibility switch was introduced in the first JAXB 2.0 Early Access release. We have decided to remove this switch from future releases of JAXB 2.0. If you need to generate 1.0.x code, please use an installation of the 1.0.x codebase.
0N/A.TP 3
4176N/A\-Xlocator & \-Xsync\-methods
4176N/AThese switches have been disabled for now. We plan on releasing this functionality as a separate download in the future.
0N/A.RE
0N/A
4176N/A.LP
4176N/A.RE
0N/A.SS
0N/ACompiler Restrictions
4176N/A.LP
4176N/A.LP
0N/AIn general, it is safest to compile all related schemas as a single unit with the same binding compiler switches.
0N/A.LP
4176N/A.LP
0N/APlease keep the following list of restrictions in mind when running xjc. Most of these issues only apply when compiling multiple schemas with multiple invocations of xjc.
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
4176N/ATo compile multiple schemas at the same time, keep the following precedence rules for the target Java package name in mind:
4176N/A.RS 3
4176N/A.TP 3
0N/A1.
0N/AThe "\f2\-p\fP" command line option takes the highest precedence.
1178N/A.TP 3
1178N/A2.
1178N/A<\f2jaxb:package\fP> customization
1178N/A.TP 3
1178N/A3.
1178N/AIf \f2targetNamespace\fP is declared, apply \f2targetNamespace\fP \-> Java package name algorithm defined in the specification.
1178N/A.TP 3
1178N/A4.
1178N/AIf no \f2targetNamespace\fP is declared, use a hardcoded package named "generated".
1178N/A.RE
1178N/A.TP 2
1178N/Ao
1178N/AIt is not legal to have more than one <\f2jaxb:schemaBindings\fP> per namespace, so it is impossible to have two schemas in the same target namespace compiled into different Java packages.
1178N/A.TP 2
1178N/Ao
1178N/AAll schemas being compiled into the same Java package must be submitted to the XJC binding compiler at the same time \- they cannot be compiled independently and work as expected.
1178N/A.TP 2
1178N/Ao
1178N/AElement substitution groups spread across multiple schema files must be compiled at the same time.
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A.SH "See Also"
1178N/A.LP
1178N/A.RS 3
1178N/A.TP 2
1178N/Ao
1178N/AJAXB 2.0:
1178N/A.RS 3
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Release Notes\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/ReleaseNotes.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2XJC\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/xjc.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2XJCTask\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/xjcTask.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2SchemaGen\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/schemagen.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2schemagenTask\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/schemagenTask.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Sample Apps\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/samples.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Changelog\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/changelog2.html
1178N/A.RE
1178N/A.TP 2
1178N/Ao
1178N/AJAXB 1.0.x:
1178N/A.RS 3
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Release Notes\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/jaxb\-1_0.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Changelog\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/changelog.html
1178N/A.RE
1178N/A.TP 2
1178N/Ao
1178N/AJAXB RI Extensions:
1178N/A.RS 3
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Runtime Properties\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/vendorProperties.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2XJC Customizations\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/vendorCustomizations.html
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Develop Plugins\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/developPlugins.html
1178N/A.RE
1178N/A.TP 2
1178N/Ao
1178N/AJAXB RI Schema Languages:
1178N/A.RS 3
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2W3C XML Schema\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#xschema
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2RELAX NG\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#relaxng
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2DTD\fP @
1178N/A.fi
1178N/Ahttp://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#dtd
1178N/A.RE
1178N/A.TP 2
1178N/Ao
1178N/AJAXB Community:
1178N/A.RS 3
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Java.net Homepage\fP @
1178N/A.fi
1178N/Ahttp://jaxb.dev.java.net
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2Developer interest list\fP @
1178N/A.fi
1178N/Ahttps://jaxb.dev.java.net/servlets/ProjectMailingListList
1178N/A.TP 2
1178N/A*
1178N/A.na
1178N/A\f2FAQ\fP @
1178N/A.fi
1178N/Ahttps://jaxb.dev.java.net/faq/index.html
1178N/A.RE
1178N/A.RE
1178N/A
1178N/A.LP
1178N/A
1178N/A