Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

while running Tomcat Server problem

  Asked By: Tracey    Date: Feb 22    Category: Java    Views: 1522
  

I have installed J2sdk1.4.2 in D:\j2sdk1.4.2 my system....
I have installed Tomcat 4.1 in D:\Tomcat 4.1 my system....
But I couldn't able to start the server....
While I am trying to start the server in the command prompt the following error
occured....

D:\Tomcat 4.1\bin>startup
The CATALINA_HOME environment variable is not defined correctly
This environment variable is needed to run this program

I have set the environment variable in the follwoing manner...
Variable Name:CATALINA_HOME
Variable Value:D:\j2sdk1.4.2\bin;
What should I do to rectify this problem????.....
How should I set the environment variable????....
I am expecting positive result from any one....

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Willis Hill     Answered On: Feb 22

CATALINA_HOME variable  should be set  as D:\Tomcat 4.1 and not D:\j2sdk1.4.2.
I think tomcat  should startup properly then.

 
Answer #2    Answered By: James Williams     Answered On: Feb 22

set a environment  variable tomcat_home= d:\tomcat4.1
you need not CATALINA_HOME. it can be set  automatically.

 
Answer #3    Answered By: Albert Ellis     Answered On: Feb 22

First of all please tell that which operating system  are u using,I tryed to run
my tomcat  on Windows 98 for more than 6 months but it did not worked and when I
installed Windows 2000 Professional than it started running  prefectly.Now I am
explining the whole process as follows :

Step 1: First install jdk1.3 and tomcat 4 in your C: drive(I did it like that u
can use any drive),please make sure that tomcat 4.0 and jdk 1.3 are the best
choices.

Step 2 Now go the bin folder,in the bin folder you can find a startup.bat
file,open this file with notepad,set the home of jdk1.3 and tomcat as follows:

set JAVA_HOME=C:\JDK1.3

set TOMCAT_HOME=C:\TOMCAT

After making the above mentioned changes t your startup.bat file the file will
look like the one which is at the last of this mail u can copy paste this file.

Step 3 Now go the DOS prompt  go to C:,go to tomcat folder,go to bin and simply
type startup,suppose u r on dos prompt than u can do it as follows:

C:

cd tmcat

cd bin

startup

Another window on DOS prompt would be opened with the title of catilina and your
server is running.

Startup.bat

@echo off
rem ---------------------------------------------------------------------------
rem startup.bat - start  Script for the CATALINA Server
rem
rem $Id: startup.bat,v 1.3 2000/10/16 18:50:58 craigmcc Exp $
rem ---------------------------------------------------------------------------
set JAVA_HOME=C:\JDK1.3
set TOMCAT_HOME=C:\TOMCAT
set _CATALINA_HOME=%CATALINA_HOME%
if not "%CATALINA_HOME%" == "" goto gotCatalinaHome
set CATALINA_HOME=.
if exist "%CATALINA_HOME%\bin\catalina.bat" goto gotCatalinaHome
set CATALINA_HOME=..
if exist "%CATALINA_HOME%\bin\catalina.bat" goto gotCatalinaHome
echo Unable to determine the value of CATALINA_HOME
goto cleanup
:gotCatalinaHome
"%CATALINA_HOME%\bin\catalina" start %1 %2 %3 %4 %5 %6 %7 %8 %9
:cleanup
set CATALINA_HOME=%_CATALINA_HOME%
set _CATALINA_HOME=

Please reply that is this slution working or not.

 
Answer #4    Answered By: Dannon Jones     Answered On: Feb 22

you need to set  CATALINA_HOME with tomcat  path not of java(jdk) path.
This is the problem  only .
In your case your CATALINA_HOME and JAVA_HOME variables
must be like as below :

CATALINA_HOME=D:\Tomcat 4.1
JAVA_HOME=D:\j2sdk1.4.2

These both variables are needed  to set to run  tomcat .
If you are using win98 then write this in autoexec.bat file and
if you are using win2K /XP/NT set environment  Variales .
OR
you can set both of these variables in catalina.bat file also .

I pref. to set this in either autoexec.bat or as a environment variables.

 
Didn't find what you were looking for? Find more on while running Tomcat Server problem Or get search suggestion and latest updates.




Tagged: