JRE_HOME variable missing with Tomcat (win7)

ぃ、小莉子 提交于 2019-11-30 18:07:13

Configure paths like this

You can check the validity of the path by typing

echo %JAVA_HOME%

echo %JRE_HOME%

and then everything will work like a charm

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.

If you have not installed the SDK, then provide the JRE path and logout and in - this should work

I recently ran into this issue, and regardless of how many times I checked.. the variable was set in the windows advanced system properties.

What I found was that if the JRE_HOME var wasn't set, the system would default to the JRE that was part of the JDK in the JAVA_HOME directory. If you're running into this problem, and cannot resolve it.. try deleting the JRE_HOME variable.

That resolved the issue for me.

I face with the same problem and I solve it by changing tomcat configuration in Intellij from its default to my own jre folder like the image below :

So, I installed Apache Tomcat/7.0.30 and now the startup runs perfectly. No more 503 error and I can run the JSP stuff from other machines as I should be.

Problem is solved, but the mystery remains. It seems that jdk had nothing to do with the problem. Did my tomcat die of old age or something?

windows 7. tomcat 8 I was having the same problem. I was getting the ire_environment error. I applied HimalayanCoder's solution. To my surprise, the echo failed to see the java_home or the ire_home. I checked both paths and settings in enviro and both were correct. I rebooted my machine 5 times, and the echo for the java_home worked, but the ire_home still was not showing. tomcat is still not working and I am still getting jre_home error. I kept rebooting machine and after an addition 5 reboots, the jre_home path came through. my tomcat now works.

thanks HimalayanCoder.

Path has some other version of java like JDK1.6. Please remove the unwanted version in the path, then start the Tomacat 7.

After trying all the possible answers I have checked my path and then I have removed the Java1.6 from the path, then started the tomcat. It worked for me.

I just resolved this issue by deleting the JRE_HOME variable.As it was saying "JRE_HOME variable is not set to this path (Apache\bin)."

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!