title: How to run as administrator from java code(For mac osx)?
body: <p>I am trying to run a command on my mac os with java code :-</p>
  
  <pre>Process p = Runtime.getRuntime().exec(command);</pre>
  
  <p>This is the command</p>
  
  <pre>sudo installer -pkg /Users/sumish/Desktop/aster.mpkg -target /Applications</pre>
  
  <p>When I run the command from terminal it prompts me for a administrator password</p>
  
  <p>How can I do this from my code? </p>