[ 
https://issues.apache.org/jira/browse/DAEMON-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mladen Turk closed DAEMON-198.
------------------------------

    Resolution: Won't Fix

Paths ending with backslashes are invalid.
If you suspect you can have a backslash in the evironment variable you can use 
the following:
++JvmOptions=-DBASE_PATH="%basePath:\=/%"
This will expand basePath with all back slashes translated to forward slashes.

> Unexpected behavior parsing arguments to "install service" for procrun
> ----------------------------------------------------------------------
>
>                 Key: DAEMON-198
>                 URL: https://issues.apache.org/jira/browse/DAEMON-198
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.3
>            Reporter: Steve Ash
>            Priority: Minor
>
> When running the command line to install a procrun service, I had a batch 
> script that looked something like:
> {panel}
> set basePath=c:\base path\
> ...
> procrun.exe //IS ... ++JvmOptions=-DBASE_PATH="%basePath%" --JvmMs=...
> {panel}
> Unfortunately when the arguments were parsed the ending slash for the 
> basePath environment variable caused the double quote to be escaped.  This 
> threw off all of the subsequent arguments, causing a large string to be put 
> into the Jvm Options registry key, but the min heap size (for example) to be 
> not set at all.
> The workaround we used was to put a double slash at the end of basePath, e.g. 
> basePath=c:\base path\\.  We couldn't easily switch all of the slashes to 
> front slashes because we were using %cd% to fill in some of the paths.  
> Though maybe the mixed slashes would be ok.
> In any case, as this is a Windows application a trailing slash I would expect 
> to be common, and in parsing command line arguments with paths in quotes-- 
> this seems like a common point of potential confusion and unexpected results. 
>  Maybe its not worth the trouble, but I wanted to bring it up in any case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to