jQuery in Action, 2nd edition*
The moose likes Tomcat and the fly likes Problem while staring the Tomcat 7.0.37 ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problem while staring the Tomcat 7.0.37 ?" Watch "Problem while staring the Tomcat 7.0.37 ?" New topic
Author

Problem while staring the Tomcat 7.0.37 ?

dattathreya bonakurthi
Greenhorn

Joined: Sep 17, 2008
Posts: 20
Hi All,
I have below configurations in my system.
Jdk1.6
Jre 1.7
below system variables are set :
JRE_HOME = C:\Program Files\Java\jre7;
JAVA_HOME = C:\Program Files\Java\jdk1.6.0_37;
CATALINA_HOME = D:\JAVA_2\apache-tomcat-7.0.37;

when trying to start the tomcat using below command by going to the bin folder of apache :

D:\JAVA_2\apache-tomcat-7.0.37\bin>startup
The JRE_HOME environment variable is not defined correctly
This environment variable is needed to run this program

tried to set the path for jre_home but still the error exists.

In my system, I have two program files folders
1. C:\Program Files (x86)
2. C:\Program Files
are these the problem for the above message ?

Thanks,
Datta



dattathreya
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

Why are you attempting to use two completely different versions of Java at the same time?

You do not need to set JRE_HOME. JAVA_HOME is sufficient.


Customer surveys are for companies who didn't pay proper attention to begin with.
dattathreya bonakurthi
Greenhorn

Joined: Sep 17, 2008
Posts: 20
Tim Holloway wrote:Why are you attempting to use two completely different versions of Java at the same time?

You do not need to set JRE_HOME. JAVA_HOME is sufficient.


i had tried using single environmnet variable JAVA_HOME still it was throwing the error.

Can you please guide me.

thanks
datta
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

In that case, I suspect that the environment variables are not set for the execution context that you are trying to run Tomcat in.

In the command window where you issue the Tomcat "startup.bat" command, issue this command:


In order for Tomcat to launch properly, that command should have printed a value that points to a valid Java JDK.
dattathreya bonakurthi
Greenhorn

Joined: Sep 17, 2008
Posts: 20
Tim Holloway wrote:In that case, I suspect that the environment variables are not set for the execution context that you are trying to run Tomcat in.

In the command window where you issue the Tomcat "startup.bat" command, issue this command:


In order for Tomcat to launch properly, that command should have printed a value that points to a valid Java JDK.


Hi,

I have checked it.
there is no environmnet variable "JDK_HOME".
should I define it.


K. Gil
Ranch Hand

Joined: Apr 29, 2011
Posts: 75

all you need is JAVA_HOME set correctly,
and you can't really mix and match different versions of JRE / JDK,
and I'm not sure why you're trying this.

Do you planning to run tomcat that will run under java 6 and 7 at the same time?
this is not possible.

add:
echo %JAVA_HOME%

to your startup.bat
and execute it, make sure it shows you correct path.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

Sorry, I mis-typed it. Should have been "echo %JAVA_HOME%".
 
jQuery in Action, 2nd edition
 
subject: Problem while staring the Tomcat 7.0.37 ?
 
Similar Threads
ben..............tomcat is not installing
Execution Error
Tomcat Not Starting with startup.bat
Tomcat Not Starting with startup.bat
Error while trying to run Tomcat for servlets