Procrun documentation incorrectly states that the StartPath is *not* used when 
in jvm StartMode
-----------------------------------------------------------------------------------------------

                 Key: DAEMON-182
                 URL: https://issues.apache.org/jira/browse/DAEMON-182
             Project: Commons Daemon
          Issue Type: Bug
          Components: Procrun
    Affects Versions: 1.0.3
            Reporter: Steve Ash
            Priority: Trivial


This is just a problem with the documentation on the website on the procrun 
page.  The description for the StartPath option states that this option is not 
applicable for jvm StartMode.  This is incorrect.  In serviceStart in prunsrv.c 
the Win32 call SetCurrentDirectory is made with the StartPath option before 
starting up the JVM.  Thus, the working directory for the process is set before 
the jvm (and the classloaders) try to resolve any file names.

This is important, because without StartPath set, then the working directory 
defaults to the Windows directory (e.g. C:\Windows).  Thus, if any relative 
paths are used anywhere (classpath, etc.) then nothing will resolve.  In my 
case the service control manager received a 3 return code from procrun 
indicating that the main class could not be found (which is true-- my classpath 
was all built with relative paths).  Setting the StartPath property corrected 
my problem.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to