tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [speculative] gc log filename variables in windows
Date Mon, 08 Oct 2012 20:30:44 GMT
MrVJTod wrote:
> and I'm not going to convert my few remaining windows JVMs to use batch files
> instead of running as a service. 
> this is just extra motivation to get these last windows JVMs converted to
> *nix.

I basically agree, and this is thus just a bit of intellectual musing :

In the Registry of my Windows XP laptop, under 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tomcat6, I see an "ImagePath" with a

value "C:\apache-tomcat-6.0.24\bin\tomcat6.exe //RS//Tomcat6".

(tomcat6.exe being this "service wrapper" I was mentioning before : it provides the 
necessary wrapping to act as a Windows Service, and actually runs the JVM that runs Tomcat).

It may be possible to change this ImagePath to run a Windows .CMD file which would set the

appropriate "NOW" variable and then run the above wrapper .exe.

And then, using tomcat6w.exe (the GUI registry editor which allows to set the environment

which the wrapper passes to the JVM it runs), set a Java option including a reference to 

If pigs can fly (and it seems that in some countries many people think they can - see, it may even work.

Or, rather than playing around modifying things in the Registry, how about :
- create a user to run the Tomcat Service, and modify the Tomcat Service to run as that 
user (rather than as "LocalSystem")
- give that user a "logon script"
- set the NOW variable in the logon script of that user
Windows may call that script whenever it starts the Tomcat Service.

Again, just idle speculation but hey, this is a Tomcat list, not a Windows one.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message