I apologize for not being clearer.
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 . To this effect, I was wondering if
there is a way to extend Bootstrap class of Tomcat to achieve it.
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.

Thanks,
Anand

On Thu, Jun 30, 2011 at 12:04 PM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:

> > From: Anand HS [mailto:anan...@gmail.com]
> > Subject: Set Java VM arguments programmatically in Tomcat
>
> > I would like to set JVM  arguments like Xmx, Xms etc programmatically
> > and provide it to Tomcat at start up.
>
> Not quite sure what you mean by "programmatically" here, since the values
> must be set during JVM initialization, long before any Tomcat code runs.
>  You can write your own script that sets the CATALINA_OPTS variable and then
> invokes the regular Tomcat startup scripts.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to