<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!ENTITY metainfo SYSTEM "metainfo.sgm">
<!ENTITY Date "22 Dec 2004">
<!ENTITY SectDesc "User Commands">
<!ENTITY Software "J2EE SDK 1.4">
<!ENTITY arch "generic">
<!ENTITY copyright "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<refentry id="schemagen-1m">
<refmeta><refentrytitle>schemagen</refentrytitle><manvolnum>1M</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="schemagen">schemagen &mdash; creates
a schema file for each namespace referenced in your Java classes</primary>
</indexterm><indexterm><primary sortas="creates a schema file for each namespace referenced in your Java classes">
creates a schema file for each namespace referenced in your Java classes &mdash;
schemagen</primary></indexterm><refname>schemagen</refname><refpurpose> creates
a schema file for each namespace referenced in your Java classes</refpurpose>
</refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>schemagen</command><arg><replaceable>options</replaceable></arg>
<arg><replaceable>java_source_files</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>The schema generator can be launched using the appropriate <command>
schemagen</command> shell script in the <filename>bin</filename> directory
for your platform. For this Early Access release, we are only providing a
basic shell script for evaluation purposes. Future releases will contain more
robust schema generation tools.</para>
<para>The current schema generator processes Java source files only. Future
versions of the tool may also be capable of processing compiled class files.
</para>
<para>If your Java sources reference other classes, those sources must be
accessible from your system CLASSPATH environment variable or errors will
occur when the schema is generated.</para>
<para>The current schema generator simply creates a schema file for each namespace
referenced in your Java classes. There is no way to control the name of the
generated schema files at this time.</para>
</refsect1>
<refsect1><title>&opts-tt;</title>
<variablelist termlength="medium">
<varlistentry><term><option>d <replaceable>path</replaceable> </option></term>
<listitem><para>Specifies the location of the processor- and <command>javac
</command>&mdash;generated class files.</para>
</listitem></varlistentry>
<varlistentry><term><option>cp <replaceable>path</replaceable> </option></term>
<listitem><para>Specifies the location of the user-specified files.</para>
</listitem></varlistentry>
<varlistentry><term><option>classpath <replaceable>path</replaceable> </option></term>
<listitem><para>Specifies the location of the user-specified files.</para>
</listitem></varlistentry>
<varlistentry><term><option>help </option></term><listitem><para>Displays
detailed usage information.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&exam-tt;<?Pub Caret></title>
<example>
<title>Using <command>schemagen</command> to generate schema files on Solaris/Linux
</title>
<screen>% $JAXB_HOME/bin/schemagen.sh Foo.java Bar.java ...
      Note: Writing schema1.xsd
      </screen>
<para>This example shows how to generate the schema files without specifying
the location of the generated class files.</para>
</example>
<example>
<title>Using <command>schemagen</command> to generate schema files</title>
<screen>schemagen File1.java File2.java 
      Note: Writing schema1.xsd     </screen>
<para>This example shows how to generate the schema file without specifying
the location of the generated class files.</para>
</example>
<example>
<title>Using <command>schemagen</command> to generate schema files and specify
the location of the generated class files</title>
<screen>schemagen.bat File1.java File2.java -d /usr/var/project1 
      Note: Writing schema1.xsd      </screen>
<para>This example shows how to generate the schema file with a specified
location for the generated class files.</para>
</example>
</refsect1>
<refsect1><title>&also-tt;</title>
<para><link linkend="xjc-1m"><citerefentry><refentrytitle>xjc</refentrytitle>
<manvolnum>1M</manvolnum></citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000004501>
