歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Java 8 中使用Ant的 Wsimport 任務

Java 8 中使用Ant的 Wsimport 任務

日期:2017/3/1 9:43:41   编辑:Linux編程

Java 8 中使用Ant的 Wsimport 任務

<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath refid="metro.classpath"/>
</taskdef>

在使用ant構建時,拋出異常:

java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: ... schema_reference:
Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.

解決辦法: 在 path/to/jdk8/jre/lib下面添加一個jaxp.properties的文件,內容為:

javax.xml.accessExternalSchema = all

Java 8 中 HashMap 的性能提升 http://www.linuxidc.com/Linux/2014-04/100868.htm

Java 8 的 Nashorn 引擎 http://www.linuxidc.com/Linux/2014-03/98880.htm

Java 8簡明教程 http://www.linuxidc.com/Linux/2014-03/98754.htm

Apache Ant 的詳細介紹下載見 http://www.linuxidc.com/Linux/2013-08/88313.htm

Android 編譯工具 Ant http://www.linuxidc.com/Linux/2013-05/84490.htm

Apache Ant 的詳細介紹:請點這裡
Apache Ant 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved