On 02/22/2014 07:22 PM, Turtles wrote:
I have java working properly (so ignore the quotes and anything else that
looks wrong).  That isint the issue, its getting derby to load properly.
FireDaemon loads the process a little differently than the command line but
it works because other java applications ive run as services run fine
(tomcat for example).

I'm not familiar with FireDaemon, so the following may not be relevant.

I was faced with a similar issue when trying to create Windows services for a server that had to be started with a long and complicated command line. I was able to start the server in cmd.exe just fine, but when issuing the net start <service> command it would fail with strange errors.

After some googling I discovered that there are registry entries that contain the string used to start the service. By inspecting that reg. entry after creating my service, I could see that the command line was being mangled in various ways if it contained spaces or other special characters. Some things I managed to work around by adding various quotes and escapes, but not always.

One thing to check is whether your daemon/service facility uses a command interpreter (e.g. cmd.exe) when starting the executable. If so, you may have to quote things that should not be expanded twice, once for the command line creating the service, and once for the starting of the service.

White space in command line arguments are particularly troublesome as you must prevent spaces from being interpreted as argument separators both when creating and launching the service.

HTH,

Dyre

Reply via email to