title: How to execute a batch file from java?
body: <p>I want to execute a batch file from a java program.</p>
  
  <p>I am using the following command.</p>
  
  <pre><code>Runtime.getRuntime().exec("server.bat");
  </code></pre>
  
  <p>But the problem is I want to give a reative path instead of absolute path so that I can deploy that java project on any comp.</p>
  
  <p>The dir structure of the project is like as follows:</p>
  
  <pre><code>com
     |
    project
     |
     ------ parser
     |         |_____ Main.java
     |
     -------util
               |_____ Server.bat
  </code></pre>
  
  <p>I want to run the "Server.bat" file in the "util" dir from the "Main.java" file in the "parser" dir.</p>