We use the setenv.sh. (tomcat 4.1xxx) for all custom environment variables
as well as java options. catalina.sh references this script:
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
. "$CATALINA_HOME"/bin/setenv.sh
fi
catalina.bat has a similar reference.
We create a setenv.sh in the bin directory and place ALL environment
variables in it, including CATALINA_OPTS. Example contents:
export CATALINA_HOME=/usr/local/tomcat
# jvm command line options for tomcat
export CATALINA_OPTS=-mx128m
# db/2 env
export PATH=$PATH:/home/db2inst1/sqllib/bin
export LIBPATH=$LIBPATH:/home/db2inst1/sqllib/lib
export LD_LIBRARY_PATH=/home/db2inst1/sqllib/lib
david
"Shapira, Yoav"
<[EMAIL PROTECTED] To: "Tomcat Users List" <[EMAIL
PROTECTED]>
.com> cc:
Subject: RE: Where to set JAVA_OPTS
04/07/2004 09:57
AM
Please respond to
"Tomcat Users
List"
Hi,
Yup, same here. I don't like to rely on the environment.
Yoav Shapira
Millennium Research Informatics
>-----Original Message-----
>From: Giorgio Ponza [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, April 07, 2004 9:56 AM
>To: Tomcat Users List
>Subject: Re: Where to set JAVA_OPTS
>
>Jon Wingfield ha scritto:
>> No need to change the script. I normally set an Environment variable
in
>> the same place I define JAVA_HOME
>> Go to Control Panel \ System \ Advanced tab \ Environment
variables...
>> Well, that's where it is on XP, which i'm currently running.
>> HTH,
>> Jon
>
>I don't think is a good approach, at least for me. An environment
>variable is accessible to all java programs. Modifying the script
>affects only tomcat.
>Bye
>
>Giorgio
>
>
>>
>> Giorgio Ponza wrote:
>>
>>> Hi
>>> usually i put my JAVA_OPTS in catalina.sh (in windows is
catalina.bat)
>>> like this
>>>
>>> REM set JAVA_OPTS=-server -Xms128m -Xmx128m -verbose:gc
>>> -Xrunhprof:cpu=times,depth=6,thread=y,file=C:\log.txt
>>> set JAVA_OPTS=-server -Xms64m -Xmx64m
>>>
>>> echo Using CATALINA_BASE: %CATALINA_BASE%
>>> echo Using CATALINA_HOME: %CATALINA_HOME%
>>> echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
>>> echo Using JAVA_HOME: %JAVA_HOME%
>>> echo using JAVA_OPTS: %JAVA_OPTS%
>>>
>>> it is used later in lines like
>>> %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% ....
>>>
>>> Hope i helped u
>>> bye
>>>
>>> Giorgio
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]