-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anand,

On 6/30/2011 6:18 PM, Anand HS wrote:
> Basically I would like not to use any batch scripts ( in Windows ) to set
> CATALINA_OPTS, JAVA_OPTS etc.. , instead would like to do it through a
> custom Java program and then hook up.

You can do this, except that your Java program must launch /a second
JVM/ in order to set properties -- specifically ones such as heap sizes,
etc.

> To this effect, I was wondering if
> there is a way to extend Bootstrap class of Tomcat to achieve it.

No. By the time the Bootstrap code is called, the heap has been
configured and it's too late.

> That said, I'm not sure if it is a recommended way to do it even since I was
> trying to just explore if batch files are the only options for me to feed in
> environment variables to Tomcat and Java.

If you install Tomcat as a service, you can set those parameters in the
service definition (itself a small program that launches the JVM with
the proper parameters) and do anything you want.

But you'll never be able to do this in any practical way through Java code.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4NLJEACgkQ9CaO5/Lv0PDQkwCgpPUIvxzVxB72RHxgdFHUW1aO
LGoAnioYym9HOjaRA5tYH7CKfeKfg/Mk
=4skK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to