aspose file tools*
The moose likes Tomcat and the fly likes setting JAVA_OPTS variable in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "setting JAVA_OPTS variable in linux " Watch "setting JAVA_OPTS variable in linux " New topic
Author

setting JAVA_OPTS variable in linux

Gangam Mekerira
Greenhorn

Joined: Sep 07, 2011
Posts: 4

Hi All,

I’m very new to this setting JAVA_OPTS variable.
Please can you explain in detail.

Stepwise proc for configuring
for linux machines as well(not much aware about the linux commands aswell)

–one more question :
1) If i have two tomcat application running on my windows XP ,does this JAVA_OPTS
size apply for both, if yes how to make it specific for each application.

2)what does Xms and DXms stand for.

Thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15665
    
  15

Welcome to the JavaRanch, Gangam!

Tomcat comes setup to use 2 environment variables: CATALINA_HOME and CATALINA_BASE. One refers to the directory that contains all the parts of Tomcat that can be shared between multiple instances of Tomcat. The other is a separate directory for each Tomcat instance.

In the basic setup, CATALINA_HOME and CATALINA_BASE point the the same directory and both sets of subdirectories share that common root. In your case, however, you'd have a separate CATALINA_BASE for each Tomcat you're running and it would contain things like that Tomcat's conf/server.xml file, the webapps directory, work directory, log directory, and so forth.

The easiest way to setup JAVA_OPTS is to create a file named "$CATALINA_BASE/bin/setenv.sh" and define JAVA_OPTS in that file. setenv.sh will be executed ("sourced") as part of the startup and control functions provided by $CATALINA_BASE/bin/catalina.sh, which is in turn invoked by the Tomcat startup and shutdown scripts.


Customer surveys are for companies who didn't pay proper attention to begin with.
Gangam Mekerira
Greenhorn

Joined: Sep 07, 2011
Posts: 4
Thanks a lot Tim

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting JAVA_OPTS variable in linux
 
Similar Threads
How to increase the Xmx in Tomcat 4.1.27?
Keystore was tampered with, or password was incorrect
JVM heap size setting
increasing heap size in jboss
Is this writting for JAVA_OPTS correct?