title: Jenkins | "The system cannot find the file specified"
body: <p>I am using Jenkins to schedule my selenium/java automated tests (test scripts packaged into a <code>.jar</code> file).</p>
  
  <p>I have created a <code>.bat</code> file to trigger the <code>.jar</code> file and i am calling the <code>.bat</code> file from Jenkins.</p>
  
  <p>When I manually trigger the tests, by double clicking on <code>.bat</code> file, everything runs smoothly. But when I try to run the same through Jenkins, I am getting the following error for each test case:</p>
  
  <blockquote>
    <p>"The system cannot find the file specified"</p>
  </blockquote>
  
  <p>Jenkins is calling the <code>.bat</code> file successfully, because I can see the test case name (which is present within <code>.jar</code> file) displayed on the jenkins console.</p>
  
  <p>In my java code, I have used <code>.\</code> to represent the "current directory" where my jar file is present along with an excel file which data drives the automation framework. Even the <code>.bat</code> file is present in the same location, and I have given fully qualified path on both <code>.bat</code> file and on jenkins.</p>
  
  <p>I can't hardcode and will have to use <code>./</code> in my java code. And I am running this on Windows Server (not my local machine).</p>