You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@locus.apache.org on 2000/06/25 17:18:40 UTC
cvs commit: jakarta-ant/src/bin ant.bat
conor 00/06/25 08:18:39
Modified: src/bin ant.bat
Log:
Allow the use of the JAVACMD environment variable in ant.bat to modify
how ant's JVM is invoked.
This aligns ant.bat with the ant shell script version.
Revision Changes Path
1.2 +7 -5 jakarta-ant/src/bin/ant.bat
Index: ant.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/src/bin/ant.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ant.bat 2000/01/13 10:41:39 1.1
+++ ant.bat 2000/06/25 15:18:39 1.2
@@ -1,31 +1,33 @@
@echo off
@setlocal
if "%ANT_HOME%"=="" goto checkProgFiles
-goto checkJavaHome
+goto checkJava
:checkProgFiles
rem check for ant on system drive
if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
set ANT_HOME=%SystemDrive%\Program Files\ant
-goto checkJavaHome
+goto checkJava
:checkSystemDrive
if not exist "%SystemDrive%\ant" goto noAntHome
set ANT_HOME=%SystemDrive%\ant
-goto checkJavaHome
+goto checkJava
:noAntHome
echo ANT_HOME is not set and ant could not be located
goto end
-:checkJavaHome
+:checkJava
+if "%JAVACMD%" == "" set JAVACMD=java
+
if "%JAVA_HOME%" == "" goto runAnt
set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
:runAnt
set CLASSPATH=%ANT_HOME%\lib\ant.jar;%ANT_HOME%\lib\xml.jar;%CLASSPATH%
-java -Dant.home="%ANT_HOME%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
+%JAVACMD% -Dant.home="%ANT_HOME%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
:end
@endlocal