[英]Running a .pkg installer on Mac OSX through java applet
Here is a short synopsis of what's going on. 这是正在发生的事情的简短摘要。
Right now I have a java applet that is embedded in my browser that downloads a .dmg disk image and mounts it. 现在,我的浏览器中嵌入了一个Java applet,该Java applet下载.dmg磁盘映像并进行安装。 Inside of it, it has an
installer.pkg
file that I need to be able to run so that the user begins to see the install process. 在它的内部,有一个我需要能够运行的
installer.pkg
文件,以便用户开始查看安装过程。 I have been trying a few variations of what was provided here but I believe that is only from the terminal. 我一直在尝试这里提供的内容的一些变体,但我相信这仅仅是从终端上获得的。
Essentially, I need to be able to run the .pkg file inside of the mounted disk image not using the terminal. 本质上,我需要能够不使用终端在已安装磁盘映像中运行.pkg文件。 Thanks!
谢谢!
I fixed this by simply using the open command for anyone who is interested. 我只对感兴趣的任何人使用open命令来解决此问题。 Here is a snippet of code that fixed it:
这是修复它的代码片段:
Process proc = r.exec(new String[] {"open", "/Volumes/HomeDrive/HomeInstaller.pkg"});
int exitVal = proc.waitFor();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.