Help with Tomcat startup
Hello,
I downloaded Tomcat 4.1.34 and installed it successfully. But when I try to startup tomcat by clicking startup.bat, I see a window coming up and vanishing immediately. I have no clue why this happens. I tried many times but its the same issue. I checked for the JAVA_HOME and CATALINA_HOME variables setup correctly.
Please help,
Thanks
[369 byte] By [
p_1434a] at [2007-11-26 19:11:41]

ive had this problem before.something is not set correctly.execute the bat from the command line and figure out what line is the last line executed in the bat file. go from there.
I tried doing that too, I only see the environment values in the command line and cant see anything in the popped up window which vanishes even before my eye can catch the content.Please help
If a .bat file flashes and disappears like that without doing anything, you should run it from the command line like mkoryak said.Also, why did you download Tomcat 4.1 and not 6.0, or at least 5.5?
> I tried doing that too, I only see the environment
> values in the command line and cant see anything in
> the popped up window which vanishes even before my
> eye can catch the content.
>
> Please help
The window does not vanish when you run it from the command line. Go to Start > Run, type "cmd", and press enter. Then, navigate to your $CATALINA_HOME/bin directory, and type "startup".
when I run it from cmd, this is what I see..
C:\Tomcat\bin>startup
Using CATALINA_BASE:C:\Program Files\Apache Software Foundation\Tomcat 4.1
Using CATALINA_HOME:C:\Program Files\Apache Software Foundation\Tomcat 4.1
Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\Tomcat 4.1\te
mp
Using JAVA_HOME:C:\j2sdk1.4.2_10
C:\Tomcat\bin>
a second window flahes and then closes.
Does downloading a later version help?
Crazy Windows machines. Is your server running or not? You never really said one way or the other.
> Does downloading a later version help?I had a bunch of problems with Tomcat 4.0.5 and Tomcat 5.5.9, so I upgraded to the newest release, Tomcat 6.0.9, and everything worked.
okdo thisedit the bat fileand between every lineputpausethen run the file again and see how far you get, and what line you are at. i suspect it calls another bat file somewhere there, like maybe startcatalina.bat or something like that
In my experience spaces in directory names cause nothing but problems with tomcat.
I inserted the "pause" and below is the code where the things go wrongscall "%EXECUTABLE%" start %CMD_LINE_ARGS%not sure what this is
ok before that line enter this:echo %EXECUTABLE%echo %CMD_LINE_ARGS%this will tell you what it calls and what command line args are.
> when I run it from cmd, this is what I see..
>
> C:\Tomcat\bin>startup
> Using CATALINA_BASE:C:\Program Files\Apache
> Software Foundation\Tomcat 4.1
> Using CATALINA_HOME:C:\Program Files\Apache
> Software Foundation\Tomcat 4.1
> Using CATALINA_TMPDIR: C:\Program Files\Apache
> Software Foundation\Tomcat 4.1\te
> mp
> Using JAVA_HOME:C:\j2sdk1.4.2_10
> C:\Tomcat\bin>
>
>
> a second window flahes and then closes.
Why are you running from C:\Tomcat\bin when the install is under program files?
> Why are you running from C:\Tomcat\bin when the> install is under program files?Because he installed it in C:\Tomcat?
This is where I get the problem, during this code execution I see a window flashing:
C:\Tomcat\bin>pause
Press any key to continue . . .
C:\Tomcat\bin>rem Execute Java with the applicable properties
C:\Tomcat\bin>if not "" == "" goto doJpda
C:\Tomcat\bin>if not "" == "" goto doSecurity
C:\Tomcat\bin>start "Tomcat" "C:\j2sdk1.4.2_10\bin\java"-Dsun.io.useCanonCach
es=false -Djava.endorsed.dirs="C:\Tomcat\common\endorsed" -classpath "C:\j2sdk1
.4.2_10\lib\tools.jar;C:\Tomcat\bin\bootstrap.jar" -Dcatalina.base="C:\Tomcat" -
Dcatalina.home="C:\Tomcat" -Djava.io.tmpdir="C:\Tomcat\temp" org.apache.catalina
.startup.Bootstrap start
C:\Tomcat\bin>goto end
C:\Tomcat\bin>pause
I installed Tomcat in C:\Tomcat;I am running it from C:\Tomcat\bin> startup
In that case it is picking up a different installation under program files:Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 4.1Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 4.1
No, actually I pasted a wrong code. Please look at the above posting which says that its picking up from c:\tomcat\bin location
Ah- I seeI had a similar problem when I mapped a drive to the folder in which tomcat sits.so tomcat was in C:\apache\tomcat and I mapped T to C:\apachewhen I tried startup in T:\tomcat\bin it failed but worked when I was in C:\apache\tomcat\bin
Thanks everyone for your replies.
I got the issue resolved. I replaced the "start" keyword with "run" in startup.bat file. That way the error got printed in my command prompt window and I got that corrected. It was a port issue where the 8080 port was already in use.
Thanks again for your time
Which version of Tomcat did you download?Was it the .zip binary or was it the Windows Installer package?With the .exe you do not need to use the startup.bat.As it is installed as a windows service and starts up in the background each time windows boots up.