This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I was setting up Tomcat on my machine. When I ran startup.bat, it complained about JRE_HOME or JAVA_HOME not set.
So, I set JRE_HOME to a JRE folder. DIDNT WORK
Next, removed JRE_HOME environment variable and added JAVA_HOME and set it's value to the JDK folder. WORKED
Now, I run startup.bat and here's what I see in the cmd window
Using CATALINA_BASE: C:\Apache Tomcat
Using CATALINA_HOME: C:\Apache Tomcat
Using CATALINA_TMPDIR: C:\Apache Tomcat\temp
Using JRE_HOME: C:\Java\jdk1.6.0_04
Really?? I thought I REMOVED JRE_HOME variable and added JAVA_HOME variable that made it work. Why does it say Using JRE_HOME?
Although there's rumor that this is changing, currently you are required to set JAVA_HOME to point to a JDK, not a JRE. If I'm not mistaken, that's because it needs the "javac" program to compile JSPs. So if it's actually saying "JRE" in the console messages, technically it's inaccurate. I haven't been noticing myself.
An IDE is no substitute for an Intelligent Developer.
Joined: May 16, 2006
Thanks Misha, Tim.
I found the line in catalina.bat that you mentioned.
I also found this in catalina.bat
Shouldn't it echo Using JAVA_HOME instead of Using JRE_HOME, if JRE_HOME was not set or empty?