Am trying to run a .mpkg application from my java code :
public void runNewPkg(){ try { String command = \"sudo installer -pkg Snip.mpkg -target /App
You can provide the password to sudo:
echo "p@sw0rd" | sudo -S cal -y 2011
The command above runs 'cal -y 2011' with root permissions.