• 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

cannot lanuch ant when JDK installed in a directory with space

 
Greenhorn
Posts: 9
  • 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 ant 1.6.2. I have created a very simple built file from user manual. In my xp machine, I have installed jdk in default location, that is, it is under C:\Programm Files\..., I have defined JAVA_HOME in Path varailbe. However, I got an error when running ant,it shows

Files\java\jdk_1.5.0_01bin"" was unexpected at this time.

It seems the space in JAVA_HOME is not correctly handled. I have moved the same thing to a win2k machine where jdk is installed directly under c:. Everything is ok. Is there any work arounds for the xp machine?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Boyan,
Do you have quotes around the directory name?
 
Boyan Wu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. I have set the JAVA_HOME in the path environment varaible, I tried both with double quotes and without quotes, but either works

2. I also tried to set JAVA_HOME in my batch script with quotes and clear the path varaible first and then assign JAVA_HOME to path as the first value, but also does not work

I searched bugzilla in apache's website, there is similar bug report before but is should be fixed in earlier versions.
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's like an ancdote:
- Doctor, it hurts when i do like this...
- So don't do it!
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try switching to 8 char DOS names (e.g., "Program Files" -> "Progra~1")

I prefer to install jdk elsewhere but this could save you some pain.
 
Boyan Wu
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The 8 character DOS name works for me. Thank you.
 
Your mother was a hamster and your father was a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic