求助,大侠就我
小弟想用Ant工具实现程序的装配,已经通过了,可是键入build.bat后抛出
Exception in thread "main"java.lang.NoClassDefFound:org/apache/tools/ant/main的异常.后来我直接找出ant包下main.class,还是同样的问题.请问这是什么原因啊.是不是下面的两个文件有错啊.
build.bat内容
@echo off
rem build.bat -- Build Script for the "Hello, World" Application
rem $Id: build.bat,v 1.3.2.2 2000/11/27 22:45:57 craigmcc Exp $
set _CP=%CP%
rem Identify the custom class path components we need
set CP=%TOMCAT_HOME%\common\lib\ant.jar;%TOMCAT_HOME%\common\lib\servlet.jar
set CP=%TOMCAT_HOME%\common\lib\jaxp.jar;%TOMCAT_HOME%\common\lib\parser.jar
set CP=%CP%;%JAVA_HOME%\lib\tools.jar
rem Execute ANT to perform the requird build target
java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -D tomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
set CP=%_CP%
set _CP=