<p>I'm using Windows and I'm trying to get ANT to work.</p>

<p>When I do an ant build from the command line, I get:
<code>C:\dev\Projects\springapp\${%ANT_HOME%}\lib not found.</code></p>

<p>I look into the <code>build.xml</code> file and I find:
<code>appserver.home=${user.home}/apache-tomcat-6.0.14</code> (which I just copied and pasted straight from a tutorial)</p>

<p>I changed it to:</p>

<p><code>appserver.home="C:\Program Files\Apache Software Foundation\Tomcat 6.0"</code></p>

<p>but now I get:</p>

<p><code>C:\dev\Projects\springapp\"C:Program FilesApache Software FoundationTomcat 6.0"\lib not found.</code></p>

<p>It seems like the white space in Program Files and Tomcat 6.0 are causing the build to fail.  How do you deal with these in xml files without re-creating the directory with a path with no white space?</p>

[{'answer_id': 55426, 'author': 'Vinko Vrsalovic', 'author_id': 5190, 'author_profile': 'https://Stackoverflow.com/users/5190', 'pm_score': 4, 'selected': False, 'text': '<p>Change it to </p>\n\n<pre><code>appserver.home="C:\\\\Program Files\\\\Apache Software Foundation\\\\Tomcat 6.0"\n</code></pre>\n'}, {'answer_id': 55492, 'author': 'Dominik Grabiec', 'author_id': 3719, 'author_profile': 'https://Stackoverflow.com/users/3719', 'pm_score': 1, 'selected': False, 'text': '<p>In addition to escaping the windows directory separator also make sure that all paths that you type in should be with correct capitalisation, Windows is not case sensitive but case presrving, while Ant is case sensitive.</p>\n'}, {'answer_id': 56911, 'author': 'Rob Spieldenner', 'author_id': 5118, 'author_profile': 'https://Stackoverflow.com/users/5118', 'pm_score': 2, 'selected': False, 'text': '<p>It looks like you have your properties setup incorrectly.</p>\n\n<p>I\'m guessing your basedir property is pointing at C:\\dev\\Projects\\springapp and your properties are using value like:</p>\n\n<pre><code>&lt;property name="property.1" value="directory" /&gt;\n</code></pre>\n\n<p>instead of</p>\n\n<pre><code>&lt;property name="property.1" location="directory" /&gt;\n</code></pre>\n\n<p>Using the location property then resolves links as relative to your basedir if the location is a relative path and to the absolute path if you enter one of those.  If you could post parts of your Ant file specifically how you define appserver.home and how you use it in the task that\'s throwing the error I could be more specific.</p>\n'}, {'answer_id': 3667871, 'author': 'Eugene', 'author_id': 442423, 'author_profile': 'https://Stackoverflow.com/users/442423', 'pm_score': 3, 'selected': False, 'text': '<p>Variant with "/" instead "\\" works on my system. Just need to delete " symbols before and after path structure.  </p>\n'}, {'answer_id': 4327767, 'author': 'caseyboardman', 'author_id': 807, 'author_profile': 'https://Stackoverflow.com/users/807', 'pm_score': 1, 'selected': False, 'text': '<p>In the top of your build.xml, try adding\n<code>&lt;property environment="env"/&gt;</code>\nand then using <code>${env.USER_HOME}</code> (or whatever you have in your environment).  That did it for me (${env.JAVA_HOME} rather than <code>${java.home}</code>).</p>\n'}, {'answer_id': 6830626, 'author': 'gliptak', 'author_id': 304690, 'author_profile': 'https://Stackoverflow.com/users/304690', 'pm_score': 2, 'selected': False, 'text': '<p>Find the Windows short name for those directories using <code>dir /x</code> and use thme when setting <code>path</code> values.</p>\n\n<p>Some more discussion at <a href="https://stackoverflow.com/questions/324041/how-does-windows-determine-handle-the-dos-short-name-of-any-given-file">How does Windows determine/handle the DOS short name of any given file?</a></p>\n'}]
['https://Stackoverflow.com/questions/55386', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']