启动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的跟目录下。
  • 运行bin\jlink.exe --module-path jmods --add-modules java.desktop --output jre

猜你喜欢

转载自www.cnblogs.com/Negan/p/12199259.html