Wednesday, June 22, 2011

Starting a Tomcat server


Recently I downloaded apache-tomcat-7.0.14-windows-x86 and had a few issues starting up the server.
I attempted to start the server using the “startup.bat” present in the “\tomcat\bin” folder and was facing issues that kept bombarding errors like,

The CATALINA_HOME environment variable is not defined correctly
This environment variable is needed to run this program


This issue was rectified when I keyed in the command,
>set CATALINA_HOME=D:\apache-tomcat-7.0.14-windows-x86\tomcat – the folder path where I deployed my tomcat server   
 And once the above issue was rectified, the following error occurred when attempting to start the server from the command prompt,

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE



Hence I attempted the following in the command prompt
>set JAVA_HOME=C:\Program Files\Java\jdk1.6.0
And at last my tomcat server ran like charm

2 comments:

  1. You can also add the environment variables in System Properties. For Windows 7, it is found in Advanced System Properties, but in older Windows versions it is just in System Properties on one of the tabs.

    Screen Shot at https://lh6.googleusercontent.com/-jZ6gJJptMyg/TgD14KINKkI/AAAAAAAAAP8/j9IIuJ-zPYo/env_variables.png"

    ReplyDelete
  2. That is a very valid point. Thanks for the great tip :)

    ReplyDelete