J1234
J1234

Reputation: 101

XAMPP Tomcat/Error starting Tomcat

Can someone help me solve this:

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

I have installed Java JDK. Thanks

Upvotes: 10

Views: 126523

Answers (5)

Vikash Kumar
Vikash Kumar

Reputation: 186

Go to https://youtu.be/JmmaeS7UZRk youtube link for better understanding:

  1. we need to create an Environment Variable "JAVA_HOME". and give the vale as JDK installation directory path. Ex: "C:\Program Files\Java\jdk1.8.0_66"

  2. we need to create an Environment Variable "JRE_HOME". and give the vale as JRE installation directory path. Ex: "C:\Program Files\Java\jre1.8.0_66"

  3. Go to your "tomcat" installation directory and then "conf" folder. Ex: "C:\xampp\tomcat\conf".

  4. Edit these given files with these values: i) open server.xml file which is located inside conf folder. Go to line number "70" and change the "port" number "8080" as something else for example "9999" and save it. ii) open context.xml file which is located inside "conf" folder and go to line number "19" and change <Context> tag as <Context reloadable="true"> and save it.

  5. close the "XAMPP" App and restart it.

  6. Now go to the "Config" Option inside "XAMPP" application i.e top right corner of the XAMPP app. then go to the "Service and Port Settings" then go to the "Tomcat" tab and put "9999" as the "HTTP Port" value and save it. Not restart XAMPP.

  7. Now try to start "Tomcat" Server.

  8. Open your browser and type localhost:9999 in the browser url and hit enter.

Upvotes: 16

Anonymous
Anonymous

Reputation: 49

Run XAMPP with "Administrator Privileges" to start Tomcat. It is as simple as that.

Upvotes: 4

ioses
ioses

Reputation: 1017

Try to change your port. Maybe you have another app running in the port 8080.

If you run in the 8081 for example it will run correctly

Upvotes: 2

Alex
Alex

Reputation: 31

WINDOWS-KEY + PAUSE (shortcut to System Properties), in system properties choose
Advanced system settings --> Environment variables --> add a new System variable:

Fill in:

Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.8.0 (or whatever your location/version is)

klik ok and done(maybe you should restart tomcat after this)

Upvotes: 3

Magic-Mouse
Magic-Mouse

Reputation: 613

Is your java registered in the enviorement variables.

If you open console Win+R -> CMD and write java --version (For JDK) and java -version (for JRE) do you get any output ?

Upvotes: 1

Related Questions