|
From: Leif M. <le...@ta...> - 2003-02-01 10:13:53
|
Mikkel Damsgaard wrote: >When I test my program running as a service I can not have a script starting >it. It is started >by the service manager and not in a command prompt. If I change an >environment variable in windows, my program (running as a service) wont be >able to see until i reboot windows. This is true for NT, 2000 and XP. > >If I specify wrapper.java.additional.1 on the command line, I can not use it >in the wrapper.conf file as >%JAVA_HOME% in defining fx wrapper.java.command=%JAVA_HOME%/bin/java ! > Couldn't you modify the script which installs the service so that the replacement is done within the script rather than in the conf file. I have always done it as follows: If you place this in your script: --- set APP_HOME=C:\app set JAVA_HOME=C:\jdk1.3 wrapper -i %APP_HOME%\wrapper.conf wrapper.java.command=%JAVA_HOME%\bin\java --- Then the replacements all happen in the script so the parameters passed to the wrapper are all replaced. The full command that is then stored in the registry looks like this: --- wrapper -s C:\app\wrapper.conf wrapper.java.command=C:\jdk1.3\bin\java --- At run time no environment variables are used so things work correctly. This should give you the exact same functionality as you are requesting? Cheers, Leif |