c:\Program Files\Java\jdk1.8.0_101\bin>xjc.exe -p "io.xsd.xml" -encoding "UTF-8" ".\xsdTOxml\MyField.xsd" -d ".\xsdTOxml"
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US
parsing a schema...
compiling a schema...
io\xsd\xml\Message.java
io\xsd\xml\ObjectFactory.java
命令格式: xjc.exe -p 包的路径 -encoding "UTF-8" 文件名.xsd -d 目标存放文件夹
[ERROR] schema_reference.4: Failed to read schema document 'file:/E:/KGCCDEV/xsdTOxml/io.xsd.xml', because
1) could not find the document;
2) the document could not be read;
3) the root element of the document is not <xsd:schema>.unknown location
Failed to parse a schema.
踩坑点1: 不能用绝对路径, 不然就会报上面的错误。要用和xjc.exe 同级目录的相对路径
[ERROR] 'Message' is already defined
line 1697 of file:/C:/Program%20Files/Java/j