启动tomcat提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

Posted negan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了启动tomcat提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined相关的知识,希望对你有一定的参考价值。

  昨天下了9.0.30版本的tomcat发现跑不动,在startup中pause了后提示  Neither the JAVA_HOME nor the JRE_HOME environment variable is defined  是因为缺少JAVA_HOME,配置到jdk的根文件夹就可以了。

过程中发现新的jdk中没有单独的jre文件夹了,这又让我在度娘哪里学到了可以在新的jdk中生成jre。

  • 需要切换到jdk的跟目录下。
  • 运行binjlink.exe --module-path jmods --add-modules java.desktop --output jre

以上是关于启动tomcat提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined的主要内容,如果未能解决你的问题,请参考以下文章

使用Linux shell脚本远程启动tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At

添加tomcat开机启动服务时报错:Neither the JAVA_HOME nor the JRE_HOME enviromment variable is defined

Tomcat解决配置了环境变量还是会Neither the JAVA_HOME nor the JRE_HOME environment...的问题和启动后乱码问题

startup.bat脚本启动tomcat时,cmd命令窗口闪现问题及Neither the JAVA_HOME nor the JRE_HOME environment variable is de

解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

linux环境启动tomcat时报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 的解决方案