• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat and JAVA_HOME

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suhas, check catalina.bat for explanation


rem JRE_HOME Must point at your Java Runtime installation. Defaults to JAVA_HOME if empty

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Suhas Wadadekar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what catalina.sh says:


 
Suhas Wadadekar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. Thanks Tim. I am trying to produce Using JAVA_HOME message. I'll give it a try
 
reply
    Bookmark Topic Watch Topic
  • New Topic