XAMPP tomcat 服务未以错误启动,因为“Tomcat 启动/停止时出现错误,返回代码:1" [英] XAMPP tomcat service is not starting with error as "Tomcat Started/Stopped with errors, return code: 1"

查看:44
本文介绍了XAMPP tomcat 服务未以错误启动,因为“Tomcat 启动/停止时出现错误,返回代码:1"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的 Win 10 上安装了 XAMPP 7.2.10,Apache 和 MySQL 等其他服务运行良好.但是 Tomcat 服务没有启动并抛出一个错误:Tomcat 启动/停止出错,返回码:1,确保您安装了 Java JDK 或 JRE 并且所需的端口是免费的,检查/xampp/tomcat/logs"文件夹以获取更多信息"XAMPP Tomcat 错误图片

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

我已经在C:\Program Files\Java"中安装了 Java JDK 并设置了环境变量路径.我已将JAVA_HOME"变量路径设置为C:\Program Files\Java\jdk-10.0.2"此外,没有其他程序在使用所需的端口.

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.

当我运行catalina_start.bat"时,出现以下错误:错误:系统无法找到指定的注册表项或值..[XAMPP]:找不到当前的 JDK 安装!.[XAMPP]:无法设置 JAVA_HOME.正在中止..."

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?

推荐答案

我遇到了同样的问题(XAMPP 7.3.0/Windows Server 2016/Java 11).我首先检查了环境变量,java安装 - 一切似乎都很好.

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.

遗憾的是 XAMPP 错误消息不是很有意义,所以我查看了 tomcat 安装的内部.令我惊讶的是,XAMPP 7.3.0 使用了一个非常旧的 Apache Tomcat 版本(2014 年的 7.0.56!),它不适用于 Java 9+.原因是 Tomcat 7.0.56 使用-Djava.endorsed.dirs"选项,Java 9+ 不再支持该选项.最新的 Tomcat 版本对 java 9+ 没有问题.要解决此问题,您可以继续使用 Java 8(如果可能的话)或尝试通过修改 Tomcat 启动自行修复此问题:转到您的 \xampp\tomcat\ 文件夹并查看此内容修复 Tomcat 7.0.73 不适用于 Java 9.

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.

但我建议你安装最新版本的 tomcat,不要使用 XAMPP(我最终做了)——至少在 XAMPP 更新 tomcat 版本之前.

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 .

这篇关于XAMPP tomcat 服务未以错误启动,因为“Tomcat 启动/停止时出现错误,返回代码:1"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆