簡體   English   中英

導入com.sun.xml.internal.fastinfoset.util.StringArray無法在javac中解析

[英]import com.sun.xml.internal.fastinfoset.util.StringArray cannot be resolved at javac

我正在嘗試為我的項目編寫ant腳本,但在javac我遇到了這個問題:

80: package com.sun.xml.internal.fastinfoset.util does not exist
[javac] import com.sun.xml.internal.fastinfoset.util.StringArray;
[javac]                                        ^

JAVA_HOME設置為jdk1.6 ANT_HOME設置為apache-ant-1.8.4

構建文件是

<?xml version="1.0" ?>
<project name="project" default="war">
<property name="location" location="D:\Project"></property>
<property name="project-location" location="${location}\project"></property>
<path id="Web App Libraries.libraryclasspath">
 <fileset dir="${project-location}/web/WEB-INF/lib"/>
 </path>
    <path id="EAR Libraries.libraryclasspath"/>
    <path id="compile.classpath">
        <pathelement location="${project-location}/web/WEB-INF/classes"/>
        <path refid="Web App Libraries.libraryclasspath"/>
        <path refid="EAR Libraries.libraryclasspath"/>
</path>
<path id="Server Library [JBoss v4.2] (unbound).libraryclasspath"/>

<target name="init" >
    <mkdir dir="D:/JBOSSHOME/build/classes"/>
    <mkdir dir="D:/JBOSSHOME/dist" />
</target>

<target name="compile" depends="init" >
    <javac destdir="D:/JBOSSHOME/build/classes" debug="true"       srcdir="${project-location}/src">
        <classpath refid="compile.classpath"/>
    </javac>
</target>


<target name="war" depends="compile">
    <war destfile="D:/JBOSSHOME/project.war" webxml="${project-location}/web/WEB-INF/web.xml">
        <fileset dir="${project-location}/web"/>
        <lib dir="${project-location}/web/WEB-INF/lib"/>
        <classes dir="D:/JBOSSHOME/build/classes"/>
    </war>
</target>

任何幫助或指針將非常感謝ty!

建議不要使用com.sun.internal包,因為

  • 它們不保證可以跨環境使用
  • 也不保證對這些課程的支持

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM