Permalink
Browse files

Make ant.bat more robust.

  • Loading branch information...
jclark committed Oct 27, 2008
1 parent 1ab6b0c commit 306518ec0a9f61c96c57afcf0a176b14f1886c96
Showing with 8 additions and 2 deletions.
  1. +8 −2 ant.bat
View
10 ant.bat
@@ -1,4 +1,10 @@
@echo off
setlocal
set JING_HOME=%~dp0
%JAVA_HOME%\bin\java -Dant.home=%JING_HOME% -cp %JING_HOME%lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile %JING_HOME%build.xml %*
if exist "%JAVA_HOME%\bin\java.exe" goto found
echo You must set JAVA_HOME to the directory containing the JDK
exit /b 1
:found
rem %~dp0 gives the directory including the trailing slash
rem we need the directory without the trailing slash, so add the dot
set JING_TRANG_HOME=%~dp0.
"%JAVA_HOME%\bin\java.exe" -classpath "%JING_TRANG_HOME%\lib\ant-launcher.jar" "-Dant.home=%JING_TRANG_HOME%" org.apache.tools.ant.launch.Launcher -buildfile "%JING_TRANG_HOME%\build.xml" %*

0 comments on commit 306518e

Please sign in to comment.