• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

query about the setting of environment variable for CATALINA_HOME in tomcat?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i set up my CATALINA_HOME=C:\Program Files (x86)\myproject\apache-tomcat-7.0.50;
and CLASSPATH=C:\Program Files (x86)\myproject\apache-tomcat-7.0.50\lib;
and JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_14\bin;
but on running command startup catalina.sh it is showing evironment variable not defined message...anyone having idea how to do it....?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Neeraj,
Welcome to CodeRanch!

JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_14\bin



should be

JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_14



That extra /bin is probably causing Tomcat to be unable to find it.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't actually say which environment variable the messages references.

CATALINA_HOME should point to your Tomcat base directory (which is does)

JAVA_HOME should point to the JDK base directory (as Jeanne said, remove the "\bin").

The CLASSPATH variable is not used with Tomcat, nor should you code anything that depends on it.

Finally, don't forget that special characters in paths such as blank spaces and parentheses can cause cause problems, so if you are assigning these environment variables on the command line, make sure that all necessary quotes and escapes are included or use the short-from (8.3) versions of the paths. Assuming that 8.3 is still supported in your version of Windows.
 
reply
    Bookmark Topic Watch Topic
  • New Topic