Message3624

Author mr_tines
Recipients foripperz, fwierzbicki, mr_tines, otmarhumbel
Date 2008-09-26.17:57:11
SpamBayes Score 3.0574765e-11
Marked as misclassified No
Message-id <1222451832.65.0.813976706777.issue1125@psf.upfronthosting.co.za>
In-reply-to
Content
Pretty simple, really -- the space in the "if" statement is taken as a
token delimiter because it is not enquoted.

>c:\jython2.5a3\bin\jython.bat
>rem @echo off
>rem
---------------------------------------------------------------------------
>rem jython.bat - start script for Jython (adapted from jruby.bat)
>rem
>rem Environment variables (optional)
>rem
>rem   JAVA_HOME      Java installation directory
>rem
>rem   JYTHON_HOME    Jython installation directory
>rem
>rem   JYTHON_OPTS    Default Jython command line arguments
>rem
>rem
---------------------------------------------------------------------------
>setlocal enabledelayedexpansion
>rem ----- Verify and set required environment variables
-----------------------
>set _JAVA_CMD=java
Files\Java\jdk1.6.0] was unexpected at this time.
>if not [C:\Program Files\Java\jdk1.6.0] == [] (
>

If you enquote line 20 only, then jython.bat --help goes on to do the
same at line 87

>if not [C:\Program Files\Java\jdk1.6.0] == [] (
>c:\jython2.5a3\bin\jython.bat --help
>rem @echo off
>rem
---------------------------------------------------------------------------
>rem jython.bat - start script for Jython (adapted from jruby.bat)
>rem
>rem Environment variables (optional)
>rem
>rem   JAVA_HOME      Java installation directory
>rem
>rem   JYTHON_HOME    Jython installation directory
>rem
>rem   JYTHON_OPTS    Default Jython command line arguments
>rem
>rem
---------------------------------------------------------------------------
>setlocal enabledelayedexpansion
>rem ----- Verify and set required environment variables
-----------------------
>set _JAVA_CMD=java
>if not "[C:\Program Files\Java\jdk1.6.0]" == "[]
" (set _JAVA_CMD="C:\Program Files\Java\jdk1.6.0\bin\java" )
>set _JYTHON_HOME=
>if not "[]" == "[]" goto gotHome
>pushd "c:\jython2.5a3\bin\\.."
C:\jython2.5a3>set _JYTHON_HOME="C:\jython2.5a3"
C:\jython2.5a3>popd
>if not exist "C:\jython2.5a3"\jython.jar goto tryComplete
>set _CP="C:\jython2.5a3"\jython-complete.jar
>if exist "C:\jython2.5a3"/jython-complete.jar goto run
>set _JAVA_STACK=-Xss512k
>rem Escape any quotes. Use _S for ', _D for ", and _U to escape _ itself.
>rem We have to escape _ itself, otherwise file names with _S and _D
>rem will be converted to to wrong ones, when we un-escape. See JRUBY-2821.
>set _ARGS=--help
>if not defined _ARGS goto argsDone
>set _ARGS=--help
>set _ARGS=--help
>set _ARGS=--help
>set _ARGS="--help"
>rem split args by spaces into first and rest
>for /F "tokens=1,*" %i in ("--help") do call :getArg "%i" "%j"
>call :getArg "--help" ""
>rem remove quotes around first arg
>for %i in ("--help") do set _CMP=%~i
>set _CMP=--help
>set _ARGS=""
>goto :EOF
>goto procArg
>if ["--help"] == [""] (
set _ARGS=
 goto argsDone
)
>REM NOTE: If you'd like to use a parameter withunderscore in its name,
>REM NOTE: use the quoted value: --do_stuff -> --do_Ustuff
>if ["--help"] == ["--"] goto argsDone
Files\Java\jdk1.6.0] was unexpected at this time.
>   if [C:\Program Files\Java\jdk1.6.0] == [] (
History
Date User Action Args
2008-09-26 17:57:12mr_tinessetmessageid: <1222451832.65.0.813976706777.issue1125@psf.upfronthosting.co.za>
2008-09-26 17:57:12mr_tinessetrecipients: + mr_tines, otmarhumbel, fwierzbicki, foripperz
2008-09-26 17:57:12mr_tineslinkissue1125 messages
2008-09-26 17:57:11mr_tinescreate