• 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

apache tomcat 6.0.36 issue in starting through command prompt

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic