2 Replies - 4953 Views - Last Post: 17 July 2012 - 12:10 AM

#1 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,063
  • Joined: 28-December 10

Apache Tomcat 7 won't start up

Posted 16 July 2012 - 11:48 PM

Hi there. I'm trying to manually setup and run Apache Tomcat so I could deploy multiple apps in my machine by the way of the great war file. I use Eclipse so all the server manipulation is hidden from me, so I don't have any idea how it works. Well, I tried to set up the startup.bat file like this:
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem     http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

SET JAVA_HOME=C:\J2SDK1.4.0

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem
rem $Id: startup.bat 895392 2010-01-03 14:02:31Z kkolinko $
rem ---------------------------------------------------------------------------

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
set "CATALINA_HOME=%CURRENT_DIR%"
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
:gotHome
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
echo The CATALINA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs
:start
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
start http://localhost:9999/warFile/
:end


But when I start the thing up, I only get this:
Using CATALINA_BASE:   "C:\apache-tomcat-7.0.27"
Using CATALINA_HOME:   "C:\apache-tomcat-7.0.27"
Using CATALINA_TMPDIR: "C:\apache-tomcat-7.0.27\temp"
Using JRE_HOME:        "C:\J2SDK1.4.0"
Using CLASSPATH:       "C:\apache-tomcat-7.0.27\bin\bootstrap.jar;C:\apache-tomc
at-7.0.27\bin\tomcat-juli.jar"


A cmd window flicks by, me not knowing what's in there, but when I type in "http://localhost:9999", nothing happens. I tried using netstat to 9999 but nothing shows. Any ideas?

Hey, never mind. Turns out I'm using Java 4 which somehow causes the error. I switched to Java 6 and it went fine. :)

Is This A Good Question/Topic? 1
  • +

Replies To: Apache Tomcat 7 won't start up

#2 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5395
  • View blog
  • Posts: 27,389
  • Joined: 10-May 07

Re: Apache Tomcat 7 won't start up

Posted 17 July 2012 - 12:00 AM

View PostfromTheSprawl, on 17 July 2012 - 02:48 AM, said:

Hey, never mind. Turns out I'm using Java 4 which somehow causes the error. I switched to Java 6 and it went fine. :)


Thank you for sharing the solution.
Was This Post Helpful? 0
  • +
  • -

#3 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,063
  • Joined: 28-December 10

Re: Apache Tomcat 7 won't start up

Posted 17 July 2012 - 12:10 AM

No problem sir. ^^
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1