现在的位置: 首页 > 综合 > 正文

tomcat的环境配置

2017年11月09日 ⁄ 综合 ⁄ 共 821字 ⁄ 字号 评论关闭

以前装了jdk1.6,最近想装tomcat,结果环境都配好了,出现了这个错误: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。

原因是:它不会自动登记这两个环境变量,


解决方法:记事本打开tomcat文件bin中的setclasspath.bat

 

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.7.0_02 
set JRE_HOME=C:/Program Files/Java/jre7

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 

ok,终于好了

抱歉!评论已关闭.