Windows 7中的Java jdk1.6.0_32,螞蟻1.9問題的Java運行Ant時:noclassdef
用戶&系統變量:
JAVA_HOME:C:\ Program Files文件\的Java \ jdk1.6.0_32
PATH:C:\ Program Files \ Java \ jdk1.6.0_32; c:\ ant \ bin;
ANT_HOME:c:\ANT
Run command prompt as administrator
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
H:\>c:
C:\>w:
W:\>cd webadvisor
W:\WebAdvisor>cd wasql*
W:\WebAdvisor\WASQLTEST3>c:\ant\bin\ant
Buildfile: W:\WebAdvisor\WASQLTEST3\build.xml
init:
prepare:
[echo] Preparing Update...
[copy] Copying 208 files to W:\WebAdvisor\WASQLTEST3\temp
[copy] Copying 129 files to W:\WebAdvisor\WASQLTEST3\temp
[copy] Copying 49 files to W:\WebAdvisor\WASQLTEST3\temp
splitdocs:
merge-cleanup:
[delete] Deleting: W:\WebAdvisor\WASQLTEST3\custom\WEB-INF\web.xml
findwebxml:
merge:
datatelxmloverride:
mergeDefault:
BUILD FAILED
W:\WebAdvisor\WASQLTEST3\build.xml:112: The following error occurred while executing this line:
W:\WebAdvisor\WASQLTEST3\build.xml:165: The following error occurred while executing this line:
W:\WebAdvisor\WASQLTEST3\build.xml:173: java.lang.NoClassDefFoundError: org/apache/xml/serialize/OutputFormat
at org.codehaus.cargo.module.webapp.WebXmlIo.writeWebXml(WebXmlIo.java:256)
at org.codehaus.cargo.module.webapp.WebXmlIo.writeWebXml(WebXmlIo.java:225)
at org.apache.cactus.integration.ant.WebXmlMergeTask.execute(WebXmlMergeTask.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at
我找到了一個名爲xercesImpl-2.6.2.jar的文件,並將其放在c:\ CLASSPATH = .; C:\ xercesImpl-2.6.2.jar;我還需要做什麼? – ScottM 2013-05-02 14:40:54
然後包含在ant編譯classpath中。編輯包含在antlib文件夾中的答案 – NullPointerException 2013-05-02 14:48:38
,它的工作方式像魔術一樣。謝謝@nullpointerexception – ScottM 2013-05-02 14:50:08