| Author |
Tomcat and JAVA_HOME
|
Suhas Wadadekar
Ranch Hand
Joined: May 16, 2006
Posts: 95
|
|
Hi,
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?
Any help appreciated.
Thanks,
Suhas.
|
 |
Misha Ver
Ranch Hand
Joined: Mar 03, 2008
Posts: 470
|
|
Suhas, check catalina.bat for explanation
rem JRE_HOME Must point at your Java Runtime installation. Defaults to JAVA_HOME if empty
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
|
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.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Suhas Wadadekar
Ranch Hand
Joined: May 16, 2006
Posts: 95
|
|
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?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
This is what catalina.sh says:
|
 |
Suhas Wadadekar
Ranch Hand
Joined: May 16, 2006
Posts: 95
|
|
|
Ok. Thanks Tim. I am trying to produce Using JAVA_HOME message. I'll give it a try
|
 |
 |
|
|
subject: Tomcat and JAVA_HOME
|
|
|