Setting Environment variables and System properties for Tomcat Server


Setting Environment variables and System properties for Tomcat Server

Windows Environment:


Create a file called setenv.bat in tomcat bin directory
Example: tomacta/bin/ setenv.bat
Environment variables setting:
set  <OptinName>=<option value>
Example:
set JAVA_OPTS=-Xms256m -Xmx512m -XX:MaxPermSize=256m 
 System Properties Settings:
set JAVA_OPTS =D<propertyName>=<propertyValue>
Example:
-Djava.awt.headless=true
Note: When you already configure some java option  again you want configure some you have to do following like this
set JAVA_OPTS=% JAVA_OPTS% -Djava.awt.headless=true



Linux Environment:


Create a file called setenv.sh in tomacat bin directory
Example: tomcat/bin/setenv.sh
Environment variables setting:
export  <OptinName>=”<option value>”
Example:
export JAVA_OPTS=”-Xms256m -Xmx512m -XX:MaxPermSize=256m” 
 System Properties Settings:
export JAVA_OPTS =”D<propertyName>=<propertyValue>”
Example:
export JAVA_OPTS =”-Djava.awt.headless=true
Note: When you already configure some java option again you want configure some you have to do following like this
export JAVA_OPTS=”% JAVA_OPTS% -Djava.awt.headless=true’


Share on Google Plus

About Meera Prince

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment