且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JavaC CreateProcess 错误=206,文件名或扩展名太长

更新时间:2021-12-04 02:35:23

问题不在于您的 classpath 太大.这是你正在转换成一个巨大的字符串.只需使用 classpathref 属性代替:

The problem isn't that your classpath is too large. It's that you're converting into one gigantic string. Simply use the classpathref attribute instead:

<path id="was.runtime">        
    <fileset dir="${copy.from.path}/WebContent/WEB-INF/lib">
        <include name="*.jar" />
    </fileset> 
    <fileset dir="${was_home}/lib">
        <include name="**/*.jar" />
    </fileset>
    <fileset dir="${was_home}/plugins">
        <include name="**/*.jar" />
    </fileset>
</path>

<javac
    fork="yes"
    executable="${java.home}/bin/javac"
    compiler="javac1.6"
    includeantruntime="false"
    encoding="utf-8"
    srcdir="${workspace}/${project.name}/src"
    destdir="${workspace}/${project.name}/WebContent/WEB-INF/classes"
    classpathref="was.runtime"
/>