title: "Unlink of old file failed" - Netbeans
body: <p>I am trying to execute a batch file from a java application using netbean-8.2 </p>
  
  <pre><code>Runtime.getRuntime().exec("cmd /c start build.bat");
  </code></pre>
  
  <p>The batch file contains code to pull the git changes </p>
  
  <pre><code>git pull
  </code></pre>
  
  <p>When I run the java app, the cmd prompt opens and runs the batch file successfully, but the git pull command fails, throwing the error,</p>
  
  <pre><code>Unlink of old file 'file.txt' failed. Should I try again? (y/n)
  </code></pre>
  
  <p>I am able to git pull successfully if I close the java app and run the batch file separately.</p>
  
  <p>I tried adding -J-Dosgi.locking=none in netbeans.conf file, but was unsuccessful.</p>
  
  <p>Is there a way to fix this problem without closing the java application?</p>