title: How to supply password to runas command when executing it from java
body: <p>I have to run a batch files from a java program which need administrative privilege. I am using the below command</p>
  
  <pre><code>runtime.getruntime().exec("runas /user:Admin \"C:\\Program Files\\test.bat\"");
  </code></pre>
  
  <p>but when it get executed its prompt for the password for the Admin account. How can I give the password for it.</p>