Release V1.2.12 of JavaService includes a further optional parameter for service installation.
The '-startup seconds' parameter may now be specified when installing a service. The value is stored in the registry (as milliseconds) and used on service startup. If not specified, a zero delay applies - hence fully backwards compatible.
If a startup delay is specified, the main JavaService thread will sleep for the configured time period after initiating the Java startup thread. This pause occurs after sending the initial 'Starting' notification to Windows, and before sending the subsequent 'Running' status notification.
It is intended for use if the service startup thread is known to take some time, and the user requires that Windows does not return control until the specified time period has passed - allowing the service startup processing to complete.
ServiceInterface.cpp now parses additional parameter, stores value in registry, reads registry before starting service, specifies suitable 'hint' to control manager and includes a sleep if a non-zero value is specified.