"Unable to write log file" error running JUnit batch files with Ant
<p>Every time I try to invoke an Ant build file from the command line I get an error:</p>

<blockquote>
  <p>Unable to write log file</p>
</blockquote>

<p>Am I missing something here? Please let me know as I am trying to run my Junit batch files from a command prompt using Ant.</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="AntTest"  basedir="."&gt;
  &lt;description&gt;
    AntTest project build file.
  &lt;/description&gt;

  &lt;!-- set global properties for this build --&gt;
  &lt;property name="src" location="src"/&gt;
  &lt;property name="build" location="bin"/&gt;
  &lt;property name="ExternalLibraries" location="ExternalLibraries"/&gt;
  &lt;property name="JenkinsResults" location="Results/JenkinsResults"/&gt; 
  &lt;property name="TestSuiteName" location="${src}/AntTest.testsuite"/&gt;

  &lt;!--Set the classpath for compiling the source files--&gt;   
  &lt;path id="AntTest.classpath"&gt;
        &lt;fileset dir="${ExternalLibraries}"&gt;
         &lt;include name="**/*.jar"/&gt;
        &lt;/fileset&gt;
        &lt;pathelement location="${build}"/&gt;
        &lt;pathelement location="${Results}"/&gt;
  &lt;/path&gt;  

  &lt;!--Set the framework properties required for the run--&gt;
  &lt;target name="setFrameworkProperties"&gt;
    &lt;propertyfile file="framework.properties" &gt;
        &lt;entry key="browser" operation="=" value="${Browser}" /&gt;
        &lt;entry key="url" operation="=" value="${Url}" /&gt;
        &lt;entry key="Environment" operation="=" value="${Environment}" /&gt;    
    &lt;/propertyfile&gt;   
  &lt;/target&gt;

  &lt;!--Creates the directory for the classes--&gt;  
  &lt;target name="createBuildFolder" depends="setFrameworkProperties"&gt;
    &lt;mkdir dir="${build}"/&gt;
  &lt;/target&gt; 

  &lt;!--Creates the Jenkins results folder--&gt; 
  &lt;target name="createResultsFolder" depends="createBuildFolder"&gt;
    &lt;mkdir dir="${JenkinsResults}"/&gt;    
  &lt;/target&gt;

    &lt;!--Deletes the old build jenkins results files--&gt;  
       &lt;target name="DeleteContentsOldResultsFolder" depends="createResultsFolder"&gt;
           &lt;delete&gt;
                &lt;fileset dir="${JenkinsResults}"&gt;
                    &lt;include name="**/*.*"/&gt;
                &lt;/fileset&gt;
            &lt;/delete&gt; 
        &lt;/target&gt;

  &lt;!--Compile the source code from the source folder to the build folder--&gt; 
  &lt;target name="compile" depends="DeleteContentsOldResultsFolder" description="compile the source " &gt;

   &lt;!-- Compile the java code from ${src} into ${build} --&gt;
   &lt;javac srcdir="${src}" destdir="${build}" includeantruntime="false"&gt;
   &lt;classpath refid="AntTest.classpath" /&gt;
   &lt;/javac&gt;
  &lt;/target&gt;  

  &lt;target name="runtestsuite" description="runs a junit testsuite" &gt;
   &lt;antcall id="compileTargetCall" description="Call to target compile" target="compile"/&gt;

   &lt;!-- runs a testsuite --&gt;
   &lt;junit printsummary="yes" haltonfailure="no"&gt;
      &lt;classpath refid="AntTest.classpath" /&gt;
      &lt;test name="${TestSuiteName}" haltonfailure="no" todir="${JenkinsResults}"&gt;
      &lt;formatter type="xml"/&gt;
      &lt;/test&gt;
   &lt;/junit&gt; 
   &lt;antcall id="deleteBuildFolderCall" description="Call to delete build folder" target="deleteBuildFolder" /&gt;
  &lt;/target&gt;

  &lt;!--Deletes the directory for the classes after the current run--&gt;    
  &lt;target name="deleteBuildFolder"&gt;
    &lt;delete dir="${build}"/&gt;
  &lt;/target&gt;
&lt;/project&gt;
</code></pre>