ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 贾昊林/Albert Jia <>
Subject How to use ant in web application without system path setup under linux
Date Sun, 12 Aug 2007 11:53:39 GMT

I want to use ant in my web application,but I do not have ant installed in my OS(centOS5).

So,I copy ant.jar,ant-launcher.jar and ant-junit.jar to /app/devlib,then write a shell like
below to run ant tasks

export APP_HOME=/home/saharabear/workspace/jpetstore
export BUILD_CP=${BUILD_CP}:${JAVA_HOME}/lib/tools.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/ant.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/ant-junit.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/ant-launcher.jar;
export BUILD_CP=${BUILD_CP}:${APP_HOME}/devlib/junit.jar;
${JAVA_HOME}/bin/java -classpath "${BUILD_CP}" -buildfile build.xml

but I got error like:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/launch/Launcher

I am not sure the syntax is right or not, and I didn't find anything useful from Google.

So, I do not know how to use it now, I need help here ,Thanks.

Albert Jia

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message