2

I want to include ANT, the JavaSDK and FlexSDK into my project directory. I need people in my company to be able to compile from source code.

I have a build.bat file which starts with :

ant blah/blah/blah

But what if I want to run ANT directly without the system environment variable? If I remove these from the system ant is not recognised.

I am a real newbie here, but I want to do something like this:

start "${basedir}\libs\ant\bin" ant -lib ${basedir}/libs/ant/lib/flexTasks.jar
pause

This is so that other people dont need to install a whole load of software... IT would all be contained in the folder.

1 Answer 1

3

Just set those environment variables in the same batchfile, i.e. something like :

set ANT_HOME=C:\ant182
set ANT_ARGS=-lib C:\antxtralibs
set JAVA_HOME=C:\jdk160_30
set PATH=%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin

:: default
ant -f %1

:: debug
:: ant -debug -f %1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.