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.

M A
  • 71,713
  • 13
  • 134
  • 174
user1059939
  • 1,613
  • 2
  • 20
  • 37

1 Answers1

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
Rebse
  • 10,307
  • 2
  • 38
  • 66