You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/07/20 22:57:54 UTC

[Bug 2720] New: - Ant.bat: %_JAVACMD% needs to be quoted, in case it contains spaces

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: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: mchampio@rational.com                                        |
+ |      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.