John Dawson
John Dawson

Reputation: 465

Trying to get Tomcat running with XAMPP

I have installed XAMPP v3.2.2 and have Apache and MySQL running correctly. Tomcat will not start though and comes up with the error:

Tomcat Started/Stopped with errors, return code: 1
14:37:47  [Tomcat]  Make sure you have Java JDK or JRE installed and the required ports are free
14:37:47  [Tomcat]  Check the "/xampp/tomcat/logs" folder for more information

When I open the log, called catalina.pid it simply has the PID 8556 (although this value differs each time I try to run Tomcat).

I have changed the default ports for Tomcat. I have installed both Java JDK (C:\Program Files (x86)\Java\jdk1.8.0_65) and Java JRE (C:\Program Files (x86)\Java\jre6) and set the Environment Variables in Windows System Properties to JAVA_HOME and JRE_HOME to the previously mentioned file paths. I'm not sure what else I can try to get past this error?

** Extra info about JRE **

For some reason I have two JRE instances, C:\Program Files (x86)\Java\jre6 and C:\Program Files (x86)\Java\jre1.8.0_65. Although I have tried setting both in the Environment Variable settings and neither works, I wondered if this may be the cause of the problem?

Upvotes: 2

Views: 21176

Answers (4)

user13289736
user13289736

Reputation: 1

Make sure that the following registry path exist:

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\14

(14 or other number)

The Tomcat starter depends on this.

Upvotes: 0

Jaydev
Jaydev

Reputation: 11

Thanks Anne Lingesh, It works as per your answer.

Go to environment variables, In system variables add,

CATALINA_HOME : C:\xampp\tomcat

JAVA_HOME : C:\Program Files\Java\jdk1.8.0_92 (Upto your jdk path in your system)

Now go to the folder C:\xampp\tomcat then shift + right click and choose open command window here and type catalina_start then hit enter.

Now to go the xampp contorl panel and start tomcat.

Upvotes: 0

Anne Lingesh
Anne Lingesh

Reputation: 65

Go to environment variables, In system variables add,

  • CATALINA_HOME : C:\xampp\tomcat

  • JAVA_HOME : C:\Program Files\Java\jdk1.8.0_92 (Upto your jdk path in your system)

Now go to the folder C:\xampp\tomcat then shift + right click and choose open command window here and type catalina_start then hit enter.

Now to go the xampp contorl panel and start tomcat.

Upvotes: 0

Ghayel
Ghayel

Reputation: 1113

It seems problem with setting paths. Make sure you set the paths example paths:

  1. CATALINA_HOME : D:\Java\Tomcat
  2. CLASSPATH : D:\Java\Tomcat\lib\servlet-api.jar;D:\Java\Tomcat\lib\jsp-api.jar
  3. JAVA_HOME : D:\Java\jdk
  4. path : D:\Java\jdk\bin;D:\Java\Tomcat\bin
  5. Also you can run Xamp Tomcat with "Administrator" privilege

If you are using skype then check and make sure skype is not using the ports 8080 or 8081. If this is the case then change skype port and restart skype

Upvotes: 2

Related Questions