深入研究jaxb xjc编码的问题

来源:爱站网时间:2021-02-08编辑:网友分享
通常,程序员会比较喜欢XSD编写xjc批处理命令来批量生成Java类,这是非常方便的,但是XSD生成的Java类有时会包含汉字,结果总是会出现一些问题,今天就跟随爱站技术频道一起来看看深入研究jaxb xjc编码的问题吧!

通常,程序员会比较喜欢XSD编写xjc批处理命令来批量生成Java类,这是非常方便的,但是XSD生成的Java类有时会包含汉字,结果总是会出现一些问题,今天就跟随爱站技术频道一起来看看深入研究jaxb xjc编码的问题吧!

可是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 xjc编码的问题爱站技术频道就为大家整理到这里了,大家看完之后,应该也知道如何入手了吧,希望大家可以尽快的完成项目。

上一篇:多态性在C++中的应用步骤

下一篇:整理约瑟夫环的数学优化方法

您可能感兴趣的文章

相关阅读

热门软件源码

最新软件源码下载