I'm not sure why you cannot simply install Ant as a complete package. I haven't used CentOS, but I know Ant installs with no problems on Redhat. And, you can install Ant completely local to your $HOME directory.

The Ant binary distribution runs under any system that has JDK 1.4 or greater installed (and probably even works under JDK 1.3). You don't need administrative or root permission to install Ant either since it can reside in any directory, and if installed under Windows, does not need access to the registry.

So, why not just install all of Ant?

On Aug 12, 2007, at 7:53 AM, 贾昊林/Albert Jia wrote:

hi,

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
code:

#!/bin/sh
export APP_HOME=/home/saharabear/workspace/jpetstore
export BUILD_CP=${CLASSPATH}
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}" org.apache.tools.ant.Main -buildfile build.xml


but I got error like:
code:

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


David Weintraub
[EMAIL PROTECTED]
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to