tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <>
Subject Re: How to change effective user id on Windows
Date Fri, 08 Jan 2010 08:10:12 GMT
2010/1/8 Amit Agarwal <>:
> HOw do we start TOmcat programatically using Bootstrap.start() API if we
> need to pass the user ?

You don't do it that way ;-).

By the time you start the Java virtual machine (JVM) that runs Tomcat,
that JVM must *already* be running as the user you want to use for

If you're running Tomcat as a service, then commons-daemon (procrun,
renamed to tomcat6w.exe, as Chuck points out in another thread) does
exactly this.  It's a C program that wraps up the launch and
management of the JVM.  It makes sure that the JVM is launched as
whatever user is required.

If you're starting the JVM yourself, then you must make sure yourself
that whatever you use to launch Tomcat runs it as the correct user.
This may be as simple as logging in as that user and running a batch

- Peter

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

View raw message