2.2.5 schemagen
Contains the schema generator that can process either Java source files or class files.
Synopsis
schemagen [OPTION]... <java files> OPTION: [-d path] [-cp path] [-classpath path] [-episode file] [-version] [-help]
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The schemagen command performs the schema generator process for either the Java source files or class files.
The current schema generator simply creates a schema file for each namespace referenced in your Java classes.
Execution permission
Superuser
Environment variable
If Java sources/classes reference other classes, they must be accessible on system CLASSPATH environment variable, or they need to be input to the tool by using the -classpath/ -cp options.
Else, errors will occur when generating schema.
Files
Java source files or class files will be input for this command.
Schema file will be output of this command.
Arguments
- -d path
-
Specifies where to place the processor and javac generated class files.
Type: String
The following values can be specified:
-
Path to place generated files
Default value: N/A
-
- -cp path | -classpath path
-
Specifies where to find the user specified files.
Type: String
The following values can be specified:
-
Path where user specified files present
Default value: N/A
-
- -episode file
-
Generates the episode file, which is just a JAXB customization file.
Type: String
The following values can be specified:
-
Name of the episode file to be created
Default value: N/A
-
- -version
-
Displays the version information.
- -help
-
Displays the usage message.
Examples
The following example performs the schema generator process for Foo.java and Bar.java.
schemagen Foo.java Bar.java
Exit Status
Exit Status |
Explanation |
---|---|
0 |
subcommand executed successfully. |
1 |
error in executing the subcommand. |