essaie d'exécuter une application .mpkg de mon code java:Exécution .pkg sur MAC OS à partir du code java
public void runNewPkg(){ try { String command = "sudo installer -pkg Snip.mpkg -target /Applications"; Process p = Runtime.getRuntime().exec(command); System.out.println(p.getErrorStream()); } catch (Exception ex) { ex.printStackTrace(); } }
et je obtiens l'erreur suivante et ma fenêtre de terminal .. se bloque
[email protected]
Password:
Sumit-Ghoshs-iMac-3:downloads sumitghosh3$ Password:
Password:
-bash: **********: command not found
Sumit-Ghoshs-iMac-3:downloads sumitghosh3$
- Je pense que j'ai besoin de fournir le mot de passe pour exécuter le pkg depuis la ligne de commande Pourriez-vous me dire comment je peux faire ça?