Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

apache tomcat 6.0.36 issue in starting through command prompt

 
Aditya Narayan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
Aditya Narayan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic