XAMPP tomcat service is not starting with error as “Tomcat Started/Stopped with errors, return code: 1”

大憨熊 提交于 2019-12-24 18:42:56

问题


I have installed XAMPP 7.2.10 on my Win 10 and other services like Apache and MySQL are working fine. But the Tomcat service is not starting and is throwing an error as: "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" XAMPP Tomcat error image

I have installed Java JDK in "C:\Program Files\Java" and have set the environment variables path. I have set the "JAVA_HOME" variable path as "C:\Program Files\Java\jdk-10.0.2" Also, no other program is using the required ports.

When I run the "catalina_start.bat", I get error as: "ERROR: The system was unable to find the specified registry key or value. . [XAMPP]: Cannot find current JDK installation! . [XAMPP]: Cannot set JAVA_HOME. Aborting ..."

What mistakes have I made here?


回答1:


I had the same problem (XAMPP 7.3.0 / Windows Server 2016 / Java 11). I first checked the environment variables, the java installation - all seemed to be fine.

Sadly the XAMPP error message is not very meaningful, so i looked inside of tomcat installation. To my surprise XAMPP 7.3.0 uses a very old version of Apache Tomcat (7.0.56 from 2014!), that don’t work well with Java 9+. The reason is Tomcat 7.0.56 uses the "-Djava.endorsed.dirs" option, that is no longer supported in Java 9+. Up-to-date Tomcat versions have no problem with java 9+. To solve this you can just stay with Java 8 (if possible for you) or try to fix this on your own by modify Tomcat start-up: Go to your \xampp\tomcat\ folder and see this fix in Tomcat 7.0.73 doesn't work with java 9.

But i would recommend you to install a up-to-date version of tomcat and don’t use the XAMPP one (what i finally did) - at least until XAMPP updates there tomcat version .



来源:https://stackoverflow.com/questions/52521934/xampp-tomcat-service-is-not-starting-with-error-as-tomcat-started-stopped-with

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!