I have an applet that I need to be able to launch a .pkg mac installer from my java applet.
Right now I can do so with the following command:
Process proc = r.exec(new String[] {"open", "/Volumes/affinegy_homeportal_setup/" + pkg});
The problem is, is that this install is to verbose and requires the user to click through the install process which is unlike my windows version of my installer which performs the installer silently in the background. My attempt to achieve this was with this command:
Process proc = r.exec(new String[] {"sudo","installer", "-pkg", "/Volumes/affinegy_homeportal_setup/affinegy_homeportal_setup.dmg", "-target", "/"});
However when I run this command nothing happens. Any suggestions on what I’m doing wrong?
Read & implement When Runtime.exec() won’t. And unless you need to support Java 1.4, use a
ProcessBuilder.