Browse Source

Add JIKESPATH and JAVA_HOME warning to the Windows batch files

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267891 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
81a0f04e4e
2 changed files with 14 additions and 2 deletions
  1. +1
    -1
      src/bin/ant
  2. +13
    -1
      src/bin/ant.bat

+ 1
- 1
src/bin/ant View File

@@ -52,7 +52,7 @@ if [ "$JAVA_HOME" != "" ] ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
fi
else
echo "Warning: JAVA_HOME environment variable not set."
echo "Warning: JAVA_HOME environment variable is not set."
echo " If build fails because sun.* classes could not be found"
echo " you will need to set the JAVA_HOME environment variable"
echo " to the installation directory of java."


+ 13
- 1
src/bin/ant.bat View File

@@ -23,9 +23,21 @@ if "%JAVACMD%" == "" set JAVACMD=java
set LOCALCLASSPATH=%CLASSPATH%
for %%i in (%ANT_HOME%\lib\*.jar) do call %ANT_HOME%\bin\lcp.bat %%i

if "%JAVA_HOME%" == "" goto runAnt
if "%JAVA_HOME%" == "" goto noJavaHome
if exist %JAVA_HOME%\lib\tools.jar call %ANT_HOME%\bin\lcp.bat %JAVA_HOME%\lib\tools.jar
if exist %JAVA_HOME%\lib\classes.zip call %ANT_HOME%\bin\lcp.bat %JAVA_HOME%\lib\classes.zip
goto checkJikes

:noJavaHome
echo.
echo Warning: JAVA_HOME environment variable is not set.
echo If build fails because sun.* classes could not be found
echo you will need to set the JAVA_HOME environment variable
echo to the installation directory of java.
echo.

:checkJikes
if not "%JIKESPATH%" == "" set ANT_OPTS=%ANT_OPTS% -Djikes.class.path=%JIKESPATH%

:runAnt
%JAVACMD% -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9


Loading…
Cancel
Save