http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2720
*** shadow/2720 Fri Jul 20 13:57:54 2001 --- shadow/2720.tmp.159 Fri Jul 20 13:57:54 2001 *************** *** 0 **** --- 1,34 ---- + +============================================================================+ + | Ant.bat: %_JAVACMD% needs to be quoted, in case it contains spaces | + +----------------------------------------------------------------------------+ + | Bug #: 2720 Product: Ant | + | Status: NEW Version: 1.3 | + | Resolution: Platform: PC | + | Severity: Minor OS/Version: Windows NT/2K | + | Priority: Other Component: Wrapper scripts | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Recently, when my JAVA_HOME env. var. changed to C:\Program + Files\Rational\common\java\jre + and I ran Ant, it died with the lines: "'C:\Program' is not recognized as an + internal or external command,operable program or batch file." + + Looking at the ant.bat file, I fixed the problem by quoting the %_JAVACMD%. + The line changed from: + :runAnt + %_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS% + org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS% + + to: + :runAnt + "%_JAVACMD%" -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS% + org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS% + + Now Windows is not confused about a path which contains spaces in it. This + would apply to the ":runAntWithJikes" label too.
