I have downloaded apache-tomcat-7.0.35
. My JDK version is jdk1.6.0_27
.
How do I configure CATALINA_HOME
as an environment variable and how do I run Tomcat server under Windows 7?
I have downloaded apache-tomcat-7.0.35
. My JDK version is jdk1.6.0_27
.
How do I configure CATALINA_HOME
as an environment variable and how do I run Tomcat server under Windows 7?
Setting the JAVA_HOME
, CATALINA_HOME
Environment Variable on Windows
One can do using command prompt:
set JAVA_HOME=C:\ "top level directory of your java install"
set CATALINA_HOME=C:\ "top level directory of your Tomcat install"
set PATH=%PATH%;%JAVA_HOME%\bin;%CATALINA_HOME%\bin
OR you can do the same:
JAVA_HOME
and provide variable value as C:\ "top level directory of your java install"
CATALINA_HOME
and provide variable value as C:\ "top level directory of your Tomcat install"
;%CATALINA_HOME%\bin;
Assuming Java (JDK + JRE) is installed in your system, do the following steps:
C:>echo %path%
C:\Program Files (x86)\Java\jdk1.6.0_27\bin;%CATALINA_HOME%\bin;
C:>echo %classpath%
C:\Program Files (x86)\Java\jdk1.6.0_27\lib\tools.jar;
C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\lib\servlet-api.jar;
C:>echo %CATALINA_HOME%
C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0;
C:>echo %JAVA_HOME%
C:\Program Files (x86)\Java\jdk1.6.0_27;
Now you can test whether Tomcat is setup correctly, by typing the following commands in your command prompt:
C:/>javap javax.servlet.ServletException
C:/>javap javax.servlet.http.HttpServletRequest
It should show a bunch of classes
Now start Tomcat service by double clicking on 'Tomcat7.exe' under 'C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin'.
Here is tutorial how to do that (CATALINA_HOME is path to your Tomcat, so I suppose something like C:/Program Files/Tomcat/
. And for starting server, you need to execute script startup.bat
from command line, this will make it:)
In order to set CATALINA_HOME:
NOTE: Do not place your apache tomcat folder within any other folder or drive, place it directly in C:// drive folder only. (I did this mistake and none of the above-mentioned solutions were working).
Open environment variable dialog box (windows key+ pause-break key --> advanced setting).
Add a new variable name as "CATALINA_HOME" and add the variable path as "C://apache-tomcat-7.1.100"(as in my case), in System Variables.
Edit PATH variable name add "%CATALINA_HOME%\bin" and press OK.
Close the window and it will be saved.
Open Command Prompt window and type command- "%CATALINA_HOME%\bin\startup.bat" to run and start the Tomcat server.
END!
There is no requirement of setting CATALINA-HOME.
Follow below instruction .
Right click on computer --> properties --> Advanced system setting --> Environment variables.
User variables section --> click on "New" --> variable name : CLASSPATH , variable value : D:\java\lib*.;D:\tomcat8\lib\servlet-api.jar.; --> Click "Ok"
New --> variable name : PATH , variable value : D:\java\bin; --> Click "Ok"
System variables section:-
Click on "New" --> variable name : PATH , variable value : D:\java\jre --> Click "Ok"
I've installed java and tomcat in D drive henceforth the locations above are under my respective paths.
Give location paths where java and tomcat are installed in your PC. Thank You
Assuming Java (JDK + JRE) is installed in your system, do the following:
C:/>javap javax.servlet.http.HttpServletRequest
It should show a bunch of classes
© 2022 - 2024 — McMap. All rights reserved.
Edit environment variables for your account
(works on non-admin accounts too) – Tarver