tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: To "export" or not, JAVA_OPTS vs. CATALINA_OPTS
Date Fri, 28 Aug 2009 19:02:44 GMT
Hash: SHA1


On 8/28/2009 1:55 PM, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote:
> Currently, our file (running on Redhat Linux) has the
> following first line:
> JAVA_OPTS="-Xmx1024m -Xms1024m"
> Two questions:
> 1.  What is the difference in doing it that way vs. adding the word
> "export" in front of it?

You should check to see what the difference is for your shell. just calls /bin/sh which could be anything, depending on
your system. I'm pretty sure that all shells will make the mentioned
variable available to sun-processes of the current process.
IIRC only uses those variables on the command lines of processes it
invokes, and therefore there is no difference whether you export or not.

> 2.  What benefit/difference, if any, would it be to use CATALINA_OPTS
> instead?

Read the top of

#   JAVA_OPTS       (Optional) Java runtime options used when the "start",
#                   "stop", or "run" command is executed.


#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
#                   or "run" command is executed.

There's probably no need to have Tomcat start-up a 1GiB JVM just to send
a "shutdown" command, for instance ;)

> All we care about is memory utilization and allocation, not
> environmental variables per se.  Thanks!

Then my example above is a good one.

- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message