Java – Command line JAXB with XJC example

Generate a JAXB package based on an XSD.

-d target directory

-p package name for the newly generated classes

me@computer ~/

$ xjc -d src -p org.thingy.model model-1.0.xsd

parsing a schema…

compiling a schema…

org\thingy\model\Aggregate.java

org\thingy\model\Attribute.java

org\thingy\model\AttributeType.java

org\thingy\model\CaseType.java

org\thingy\model\Datastream.java

org\thingy\model\Entities.java

org\thingy\model\EntityType.java

org\thingy\model\EventType.java

org\thingy\model\Events.java

org\thingy\model\IdentityType.java

org\thingy\model\ObjectFactory.java

org\thingy\model\package-info.java

 

References

https://jaxb.java.net/nonav/2.1.3/docs/xjc.html

http://docs.oracle.com/javase/6/docs/technotes/tools/share/xjc.html