IntelliJ IDEA 2016.3 Help

Generate Java from Xml Schema using JAXB Dialog

Tools | JAXB | Generate Java Code From XML Schema Using JAXB


Use this dialog box to configure generation of Java code stubs based on an XML Schema via the JAXB data binder.

  • This functionality is provided via the WebServices bundled plugin, which is enabled by default. If not, enable it as described in the section Enabling and Disabling Plugins .
  • The menu item and the dialog box are available when the file opened in the active editor tab contains an XML Schema.
ItemDescription
JAXB Schemas / wsdl / dtd pathIn this field, specify the file to be used as the generation basis. By default, the field shows the full path to the current file. To use another Schema, click the Browse button /help/img/idea/2016.3/browseButton.png and choose the desired file in the Select XML Schema File for JAXB Generation dialog box, that opens.
Output pathFrom this drop-down list, select the module source directory to place the generated Java code stubs in.
Package prefixUse this drop-down list to specify the package to place the generated Java files in.
Generate package level annotationsDo one of the following:
  • Select this check box to have a package-info.java with annotations generated.
  • Clear this check box to have annotations internalized into other generated classes.
Mark generated code with 'generated' annotationSelect this check box to have generated code supplied with the javax.annotation.Generated annotations.
Make generated file read-onlySelect this check box to force the XJC binding compiler to mark the generated Java source code as read-only.
Add necessary libraries in order for generated code compile and workSelect this check box to have additional JAXB client libraries automatically added to the classpath of the module where the generated source code will be placed.

These are libraries the generated stubs code depend on.

Do not generate headerSelect this check box to pass no-header parameter to the corresponding command.
Add external binding file/dirSelect this check box to specify an external binding file or an output directory where the generated file is located.
StatusView the information in this read-only field to track and improve discrepancies when configuring the generation procedure.

See Also

Last modified: 21 March 2017