Liferay Development

Liferay Consulting

Liferay Training

Your Trusted Liferay Solutions Partner

Wednesday, September 26, 2012

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:
set "JRE_HOME=%CATALINA_HOME%/jre1.6.0_20/win"
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

The following is example for setting multiple properties. 
if multiple properties separated by space.

set JAVA_OPTIONS=%JAVA_OPTIONS% -Duser.timezone=UTC -Duser.timezone=GMT -Dicescrum_config_location=/path/to/dir/where/i/can/write/config.groovy -Xmx512m -XX:MaxPermSize=256m



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"

The following is example for setting multiple properties. 
if multiple properties separated by space.

export JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8 -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"



Location: 5, Koti Main Rd, Koti, Hyderabad, Andhra Pradesh, India

7 comments :

  1. Australia's Largest Solar Panels True Value Solar Reviews. Buy True Value Solar - Australia's Largest Solar Panels Buy True Value Solar.

    ReplyDelete
  2. $ for linux, not %..%

    ReplyDelete
  3. Devoted servers are frequently utilized by those who've outgrown ordinary facilitating records and now require gigantic measures of information space and data transfer capacity, those with mission basic sites, web facilitating organizations, or the individuals who have uncommon necessities. https://1gbits.com/perfectmoney-vps/

    ReplyDelete
  4. Corporate sites and much littler ones frequently require the whole assets of a server, in certain examples various servers too. This is important to streamline execution of a site for its clients; the board of sites, web facilitating and picking the best facilitating alternative are very hard to make sense of. https://monovm.com/ssd-vps/

    ReplyDelete
  5. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Project Centers in Chennai for CSE.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  6. Great Information! Thanks for sharing this content with us. I have something important to share with you regarding Solar panel installation company I hope this will give you some suggestions to work on your upcoming blogs.

    ReplyDelete

Recent Posts

Recent Posts Widget

Popular Posts