title: Executing batch file from runnable jar gives path not found error
body: <p>I am executing a batch file from java program.
  When I execute from eclipse it works fine but when I make it a runnable jar it is not able to find the path of the batch file</p>
  
  <p>I kept the batch file as a resource in the source directory.
  When I print the path of the resource using Class.getResource("/resource/mybat.bat") it gives the path correctly as</p>
  
  <ul>
  <li><em><strong>resources/mybat.bat</em></strong>(jar creation option : package required library into generated jar)</li>
  <li><em><strong>file:/C:/Users/aasha.medhi/Desktop/myjar.jar!/resources/mybat.bat</em></strong>(jar creation option : Extract required libraries into generated jar) </li>
  </ul>
  
  <p>If I extract the jar, the resources folder exist.</p>
  
  <p>However when I try to run the jar, it gives "The system cant find the path specified error" for the batch file</p>
  
  <p>I have gone through most of the links and tried out different options but without any luck.
  I just need a way to create the runnable jar properly.Please help..</p>