Getting Error:JRE_HOME variable is not defined correctly when trying to run startup.bat of Apache-Tomcat [closed]

2022-08-31 21:28:30

When trying to start Tomcat Server through cmd prompt using 'startup.bat' getting error as-"JRE_HOME variable is not defined correctly. The environment variable is needed to Run this program" Defined Environment path as-

CATALINA_HOME-C:\Program Files\Java\apache-tomcat-7.0.59\apache-tomcat-7.0.59
JAVA_HOME-C:\Program Files\Java\jdk1.8.0_25;
JRE_Home-C:\Program Files\Java\jre1.8.0_25\bin;


答案 1

Got the solution and it's working fine. Set the environment variables as:

  • CATALINA_HOME=C:\Program Files\Java\apache-tomcat-7.0.59\apache-tomcat-7.0.59 (path where your Apache Tomcat is)
  • JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25; (path where your JDK is)
  • JRE_Home=C:\Program Files\Java\jre1.8.0_25; (path where your JRE is)
  • CLASSPATH=%JAVA_HOME%\bin;%JRE_HOME%\bin;%CATALINA_HOME%\lib

答案 2

Your JRE_HOME does not need to point to the "bin" directory. Just set it to C:\Program Files\Java\jre1.8.0_25


推荐