Running .pkg on MAC OS from java code

后端 未结 3 1660
青春惊慌失措
青春惊慌失措 2021-01-14 23:41

Am trying to run a .mpkg application from my java code :

public void runNewPkg(){

try {

           String command = \"sudo installer -pkg Snip.mpkg -target /App         


        
3条回答
  •  一整个雨季
    2021-01-15 00:01

    I would actually try editing your /etc/sudoers file to not prompt for a password. If you use the NOPASSWD tag, you should be able to do that. An example entry would be:

    sumitghosh3 ALL=(ALL) NOPASSWD: ALL
    

提交回复
热议问题