欢迎来到代码驿站!

C代码

当前位置:首页 > 软件编程 > C代码

深入jaxb xjc编码问题的详细介绍

时间:2022-06-07 09:20:34|栏目:C代码|点击:
平时喜欢根据写一个xjc批处理命令,根据xsd批量生成java类,觉得很方便也很酷。但是有时候xsd生成的java类中含有汉字,结果总是有些问题。
可是xjc命令参数又没有encoding参数之类的。在网上搜了一通,忽然发现了一个好东东:xjc是由com.sun.tools.internal.xjc.Driver实现的,因此
批处理命令可以如下:
java -Dfile.encoding=UTF-8 -cp D:\java\jdk1.6.0_03\lib\tools.jar com.sun.tools.internal.xjc.Driver  -p com.geostar.csw.domain.layer   metadata_geo_Layer.xsd
结果:
复制代码 代码如下:

parsing a schema...
compiling a schema...
com\geostar\csw\domain\layer\AbstractMDContentInformationType.java
com\geostar\csw\domain\layer\AbstractMDIdentificationType.java
com\geostar\csw\domain\layer\AbstractMDSpatialRepresentationType.java
com\geostar\csw\domain\layer\CIAddressType.java
com\geostar\csw\domain\layer\CICitationType.java
com\geostar\csw\domain\layer\CIContactType.java
com\geostar\csw\domain\layer\CIDateType.java
com\geostar\csw\domain\layer\CIDateTypeCode.java
com\geostar\csw\domain\layer\CIOnLineFunctionCode.java
com\geostar\csw\domain\layer\CIOnLineResourceType.java
com\geostar\csw\domain\layer\CIResponsiblePartyType.java
com\geostar\csw\domain\layer\CIRoleCode.java
com\geostar\csw\domain\layer\DQDataLineageType.java
com\geostar\csw\domain\layer\DQDataQualityType.java
com\geostar\csw\domain\layer\DQDqReportType.java
com\geostar\csw\domain\layer\DQDqStatementType.java
com\geostar\csw\domain\layer\DQSourceType.java
com\geostar\csw\domain\layer\DSAssociationTypeCode.java
com\geostar\csw\domain\layer\EXBoundingCoordinatesType.java
com\geostar\csw\domain\layer\EXExtentType.java
com\geostar\csw\domain\layer\EXGeographicBoundingBoxType.java
com\geostar\csw\domain\layer\EXGeographicBoundingPolygonType.java
com\geostar\csw\domain\layer\EXGeographicDescriptionType.java
com\geostar\csw\domain\layer\EXGeographicExtentPropertyType.java
com\geostar\csw\domain\layer\EXGeographicExtentType.java
com\geostar\csw\domain\layer\EXTemporalExtentPropertyType.java
com\geostar\csw\domain\layer\EXTemporalExtentType.java
com\geostar\csw\domain\layer\EXVerticalExtentType.java
com\geostar\csw\domain\layer\FBZY.java
com\geostar\csw\domain\layer\JHDA.java
com\geostar\csw\domain\layer\MDAerialImageIdentificationType.java
com\geostar\csw\domain\layer\MDAggregateInfomationPropertyType.java
com\geostar\csw\domain\layer\MDAggregateInfomationType.java
com\geostar\csw\domain\layer\MDAnalogMapIdentificationType.java
com\geostar\csw\domain\layer\MDApprovedTypeCode.java
com\geostar\csw\domain\layer\MDArchiveIdentificationType.java
com\geostar\csw\domain\layer\MDBrowseGraphicType.java
com\geostar\csw\domain\layer\MDCRSType.java
com\geostar\csw\domain\layer\MDCharacterSetCode.java
com\geostar\csw\domain\layer\MDClassificationCode.java
com\geostar\csw\domain\layer\MDConstraintsPropertyType.java
com\geostar\csw\domain\layer\MDContentInformationPropertyType.java
com\geostar\csw\domain\layer\MDCoverageContentTypeCode.java
com\geostar\csw\domain\layer\MDCoverageDescriptionType.java
com\geostar\csw\domain\layer\MDDataIdentificationType.java
com\geostar\csw\domain\layer\MDDescKeys.java
com\geostar\csw\domain\layer\MDDigitalArchiveIdentificationType.java
com\geostar\csw\domain\layer\MDDistributionType.java
com\geostar\csw\domain\layer\MDDistributorType.java
com\geostar\csw\domain\layer\MDEllipsoidParametersType.java
com\geostar\csw\domain\layer\MDFeatureCatalogueDescriptionType.java
com\geostar\csw\domain\layer\MDFormatType.java
com\geostar\csw\domain\layer\MDGeometricObjectTypeCode.java
com\geostar\csw\domain\layer\MDGovNameTypeBak.java
com\geostar\csw\domain\layer\MDGridSpatialRepresentationType.java
com\geostar\csw\domain\layer\MDIdentificationPropertyType.java
com\geostar\csw\domain\layer\MDIdentifierType.java
com\geostar\csw\domain\layer\MDImageDescriptionType.java
com\geostar\csw\domain\layer\MDImageIdentificationType.java
com\geostar\csw\domain\layer\MDImagingConditionCode.java
com\geostar\csw\domain\layer\MDLegConstsType.java
com\geostar\csw\domain\layer\MDMaintInformationType.java
com\geostar\csw\domain\layer\MDMaintenanceFrequencyCode.java
com\geostar\csw\domain\layer\MDMapFormCode.java
com\geostar\csw\domain\layer\MDMetadataType.java
com\geostar\csw\domain\layer\MDProgressCode.java
com\geostar\csw\domain\layer\MDProjectionParametersType.java
com\geostar\csw\domain\layer\MDReferenceSystemType.java
com\geostar\csw\domain\layer\MDReferencedThemeType.java
com\geostar\csw\domain\layer\MDResolutionType.java
com\geostar\csw\domain\layer\MDResourceTypeCode.java
com\geostar\csw\domain\layer\MDRestrictionCode.java
com\geostar\csw\domain\layer\MDRestrictionCodeEx.java
com\geostar\csw\domain\layer\MDScopeCode.java
com\geostar\csw\domain\layer\MDSecurityConstraintsType.java
com\geostar\csw\domain\layer\MDSpatialRepresentationPropertyType.java
com\geostar\csw\domain\layer\MDSpatialRepresentationTypeCode.java
com\geostar\csw\domain\layer\MDTopicCategoryCode.java
com\geostar\csw\domain\layer\MDTopoLogyLevelCode.java
com\geostar\csw\domain\layer\MDTpCatType.java
com\geostar\csw\domain\layer\MDVectorSpatialRepresentationType.java
com\geostar\csw\domain\layer\ObjectFactory.java
com\geostar\csw\domain\layer\SVOperationMetadataType.java
com\geostar\csw\domain\layer\SVServiceIdentificationType.java
com\geostar\csw\domain\layer\SpatialReferenceInfo.java
com\geostar\csw\domain\layer\TBOOL.java
com\geostar\csw\domain\layer\TDYTABLETYPE.java
com\geostar\csw\domain\layer\TDataInfo.java
com\geostar\csw\domain\layer\TJHSJ.java
com\geostar\csw\domain\layer\TJHTYPE.java
com\geostar\csw\domain\layer\TJHXX.java
com\geostar\csw\domain\layer\TLAYERTYPE.java
com\geostar\csw\domain\layer\TMInstantType.java
com\geostar\csw\domain\layer\TMPeriodType.java
com\geostar\csw\domain\layer\TMetaInfo.java
com\geostar\csw\domain\layer\TMetaTotal.java
com\geostar\csw\domain\layer\TTABLETYPE.java
com\geostar\csw\domain\layer\TTHMEATICTYPE.java
com\geostar\csw\domain\layer\TUPDATETYPE.java
com\geostar\csw\domain\layer\TUserInfo.java
com\geostar\csw\domain\layer\TVersionInfo.java
com\geostar\csw\domain\layer\TZDGL.java
com\geostar\csw\domain\layer\TZDJH.java
com\geostar\csw\domain\layer\UpdateDescribe.java
com\geostar\csw\domain\layer\package-info.java
c:\Catalog实体类生成工具>
忽然感觉好兴奋!jaxb真的是好东东!

上一篇:用C语言实现圣诞树(简易版+进阶版)

栏    目:C代码

下一篇:详解C++ 中的三种继承方式

本文标题:深入jaxb xjc编码问题的详细介绍

本文地址:http://www.codeinn.net/misctech/204006.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有