• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA_HOME

 
saravanan ragunathan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

when i run tomcat it needs JAVA_HOME environment variable.
then i set it as C:\programfiles\java\jdk; i included path seperator
at the end..then tomcat didn't recognize the JAVA_HOME ..
when i removed ; tomcat runs..is it false to include
path seperator in JAVA_HOME? if it is...why
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely you wrote "programfiles" as one word, assuming that you didn't mis-type your example. "C:\Program Files" HAS to have the space in it, as the space is part of the directory name.

You also need to put the path in quotes, or the parser will stop at the space character, and you'll end up with "C"\Program", and that won't work, either.

An alternate way is to fall back on legacy 8.3 filename support, but the shortname of the directory isn't totally predictable. Usually, it's "C:\PROGRA~1", but not always. And I'm not even sure how well that works anymore. I haven't seen a lot of 8.3 support in Windows lately.
 
saravanan ragunathan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Tim Holloway ..thanks for your reply....

As i copied the address from addressbar(c:\program files.....)i didn't get
any error for that..my question is whether i have to include ;(path seperator)
or not
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just because you didn't get an error message doesn't mean it works, and what's legal in the address bar isn't always legal in a script.

Java doesn't care about the presence or absence of a terminating path separator, although I think it looks tidier not to use one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic