|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Jun 2010
Messaggi: 21
|
[JAVA] exec()
Ho un problema con il seguente comando :
Runtime.getRuntime().exec("gedit"); in questo caso funziona benissimo , mi apre un nuovo documento con gedit adesso vorrei lanciare il terminale : Runtime.getRuntime().exec("/bin/bash"); però nn succede nulla... ho provato anche a lanciare uno script Runtime.getRuntime().exec("/bin/bash /home/usr/script.sh"); Process theProcess=null; //Runtime.getRuntime().exec("gedit"); try { theProcess = Runtime.getRuntime().exec("/bin/bash"); // theProcess = Runtime.getRuntime().exec("/bin/bash /home/usr/script.sh"); } catch(IOException e) { System.err.println("Error on exec() method"); e.printStackTrace(); } Grazie |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 04:47.



















