Tomcat is not running even though JAVA_HOME path is correct

前端 未结 18 2223
情深已故
情深已故 2020-12-09 16:07

When I am trying to run tomcat using startup.bat I get the following error,

The JAVA_HOME environment variable is not defined correctly
This env         


        
18条回答
  •  醉话见心
    2020-12-09 17:07

    To run Tomcat8 you need to have JRE_HOME defined in Env Variable.

    JAVA_HOME alone will not do even if correctly set.

    JRE_HOME = C:\Program Files\Java\jdk1.8.0_77\jre
    

    You should select the JRE that is inside SDK, i.e. one with your JDK(SDK) installation. In other words your JAVA_HOME + \jre

    When compiling JDK is needed to support JSP, to compile Servlets which are generated from *.jsp files. Otherwise to run JRE is needed. So when you develop you need JAVA_HOME and when you deploy you need JRE_HOME.

提交回复
热议问题