报错信息如下:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program;提示找不到java_home各jre_home路径,何解?

   原因不知道了,下面来看解决办法:

   1、分析startup.bat启动脚本:发现其调用了catalina.bat,而catalina.bat调用了setclasspath.bat

   2、在setclasspath.bat的头部定义了JAVA_HOME和JRE_HOME的值,那么在这里手动设置JAVA_HOME变量

rem --------------------------------------------------------------------------- rem Set CLASSPATH and Java options rem rem $Id: setclasspath.bat 505241 2007-02-09 10:22:58Z jfclere $ rem --------------------------------------------------------------------------- set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_05 set JRE_HOME=C:\Program Files\Java\jre1.5.0_05 rem Make sure prerequisite environment variables are set if not "%JAVA_HOME%" == "" goto gotJdkHome if not "%JRE_HOME%" == "" goto gotJreHome echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined echo At least one of these environment variable is needed to run this program goto exit

相关文章:

  • 2021-12-09
  • 2021-09-11
  • 2021-06-17
  • 2021-08-07
猜你喜欢
  • 2021-09-02
  • 2021-06-26
  • 2021-06-01
  • 2022-12-23
  • 2021-07-10
  • 2021-04-19
  • 2021-05-08
相关资源
相似解决方案