• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do we need to set CATALINA_HOME AND CATAlINA_BASE explicitly ?

 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers,

after installing Tomcat , do CATALINA_HOME AND CATAlINA_BASE has to be set explicitly as environment variable?

In tomcat properties under java options these variables has been set by default.

-Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0
-Dcatalina.base=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0
-Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\endorsed
-Djava.io.tmpdir=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0\conf\logging.properties




Do have to set them explicitly ?



One more thing if i had to reset the catalina.base or set more than one catalina.base. can it done be here ?
 
Pablo Abbate
Ranch Hand
Posts: 30
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm remembering that Tomcat has a setEnv.sh or setEnv.bat .. which set up the environment variables according the installation path. Please take a look into those files ...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65126
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Tomcat will set those. All you need to set is JAVA_HOME.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18281
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you launch Tomcat using one of the scripts that starts the server, such as catalina.sh, the script will default CATALINA_HOME and CATALINA_BASE to point to the parent of the directory containing the script. You do need JAVA_HOME, though - it must point to a JDK for Tomcat6 or lower. I can't remember if they managed to finally remove this restriction in Tomcat 7.

The only times you HAVE to set CATALINA_HOME and/or CATALINA_BASE are if you want to override the default values. Most commonly, you'd do that if you were using the same Tomcat binaries to run multiple instances of Tomcat.
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks everyone for your inputs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic