根据 xsd 生成 jaxb java 类

根据 xsd 生成 jaxb java 类

dos 窗口,执行命令:

xjc -p com.shagri.veg.things.marshal.pesticide E:vpstxsdpesticide.xsd -d E:vpst

将根据 E:vpstxsdpesticide.xsd 在 E:vpst 下生成包名为 com.shagri.veg.things.marshal.pesticide 的 java 文件,执行过程如下:

C:Documents and Settingsadmin>xjc -p com.shagri.veg.things.marshal.pesticide E:vpstxsdpesticide.xsd -d E:vpst
parsing a schema...
compiling a schema...
comshagriveg	hingsmarshalpesticideObjectFactory.java
comshagriveg	hingsmarshalpesticidePesticideList.java
comshagriveg	hingsmarshalpesticidePesticideType.java
原文地址:https://www.cnblogs.com/zhiqsyr/p/4992190.html