JRE_HOME variable missing with Tomcat (win7)

前端 未结 9 1965
一向
一向 2021-01-04 11:05

I installed tomcat and Apache http-servers like two weeks ago. I got it running and I was able to run the JSP-pages from another computers. I had a little pause and now that

9条回答
  •  抹茶落季
    2021-01-04 11:42

    There is no need to set both the JDK_HOME and JRE_HOME environment variables since JRE_HOME will default to the value of JDK_HOME.

    In many Tomcat installations these environment variables are not used at all, being instead set in the optional setenv.bat script. You can find all this documented in section 3 of the RUNNING.txt file in the top level directory of your Tomcat installation and a copy can be found here http://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt

    If you get the "environment variable is not defined correctly" error message you will need to check your setenv.bat file (if you have one) as well as the actual environment variables. By inspection of setclasspath.bat you can see which files it needs to see in those directories. For the JRE it expects to find both %JRE_HOME%\bin\java.exe and %JRE_HOME%\bin\javaw.exe

    In my experience this error occurs when the JRE or JDK has been subsequently removed or uninstalled.

提交回复
热议问题