tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand HS <>
Subject Re: Set Java VM arguments programmatically in Tomcat
Date Thu, 30 Jun 2011 22:18:36 GMT
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.


On Thu, Jun 30, 2011 at 12:04 PM, Caldarale, Charles R <> wrote:

> > From: Anand HS []
> > 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
> 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:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message