我有批处理脚本,问题是当我运行setup.bat时它会暂时设置JAVA_HOME,ANT_HOME然后我可以运行build.bat。如果我运行build.bat,只有ant调用会给出错误。知道这里发生了什么吗?
Setup.bat
@echo off
REM ----- BUFFER SIZE-------
mode con:cols=140 lines=9999
REM ------ Change Directory For Java Home -----
set PATH=%BASEPATH%
set ANT_HOME=d:\Tools\apache-ant-1.9.4
set JAVA_HOME=d:\Tools\jdk7x64\jdk1.7.0_55
set PATH=%ANT_HOME%\bin;%JAVA_HOME%\bin;D:\Tools\scripts;%PATH%
Build.bat
REM ----- Drive Selection ------
cd /d "D:\"
cd D:\Work\parser\trunk
call ant -f build.xml clean devbuild
cd D:\Work\dm\v3.2
call ant -f build.xml clean devbuild