0

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?

Niraj Wagh
  • 29
  • 1
  • 6

1 Answers1

0

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 .

VinZ
  • 414
  • 7
  • 15