aspose file tools*
The moose likes Tomcat and the fly likes apache tomcat 6.0.36 issue in starting through command prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "apache tomcat 6.0.36 issue in starting through command prompt" Watch "apache tomcat 6.0.36 issue in starting through command prompt" New topic
Author

apache tomcat 6.0.36 issue in starting through command prompt

Aditya Narayan
Greenhorn

Joined: Sep 17, 2012
Posts: 17
Hi All,
I am trying to learn creating servlets through textpad. But the problem is that I am unable to start tomcat through windows command prompt.
I have installed java in C:\Program Files\Java\jdk1.6.0_37

I have configured my system variables as:

variable name: JAVA_HOME
variable value: C:\PROGRA~1\Java\JDK16~1.0_3

variable name:path
variable value:C:\Program Files\Java\jdk1.6.0_37\bin

when i go to C:\apache-tomcat-6.0.36\bin and run startup.bat it gives me following error

C:\apache-tomcat-6.0.36\bin>startup
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

The same works fine through Eclipse Europa.
Please help because I have already tried many links on google for the same and could nt find the solution that works for me
Thanks
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

The JAVA_HOME environment variable is not defined correctly


The problem is Tomcat could not find Java you specified in the JAVA_HOME variable. I think Tomcat needs an exact path, not a MS-DOS (8.3 format) path.

so you should change:



to something like:



PM Me If You Want to get Urgent Help on Java Programming
Aditya Narayan
Greenhorn

Joined: Sep 17, 2012
Posts: 17
Thanks Nam Ha Minh,
Well I tried some combinations and alas ! The simplest one ran well.
The other erraneous attempts are
C:\PROGRAM FILES\Java\JDK16
C:\PROGRAM FILES\Java\JDK16~1.0_3

while the working one is
C:\Program Files\Java\jdk1.6.0_37


Thanks for suggesting. Hope this will help others too for similar error
 
Consider Paul's rocket mass heater.
 
subject: apache tomcat 6.0.36 issue in starting through command prompt