JRE_HOME variable missing with Tomcat (win7)

sfault picture sfault · Sep 19, 2012 · Viewed 82k times · Source

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 I'm trying to run the system it doesn't work. I can access the default index-page in the

  http://[my-IP-address]:8080 

but cannot access the jsp folder's pages, not even .html files. It gives me

  503 service temporarily unavailable. 

Not even the localhost seems to work.I can't recall if the Tomcat server needs to be started or if the mod_jk.so automatically handles that. When I try to start the tomcat with startup.bat it gives me the message

 JRE_HOME environment variable is not defined correctly

I've set the environment variables from system properties and I could compile/run .java files without problems.

 JAVA_HOME C:\Program Files (x86)\Java\jdk1.6.0_16

 JRE_HOME C:\Program Files (x86)\Java\jre6

So what's going on here? I installed Visual Studio, but otherwise I cannot think of any reason why the tomcat doesn't work all of the sudden. This is very frustrating, so any help would be much appreciated.

Answer

HimalayanCoder picture HimalayanCoder · Apr 29, 2014

Configure paths like this

enter image description here

You can check the validity of the path by typing

echo %JAVA_HOME%

echo %JRE_HOME%

enter image description here

and then everything will work like a charm