[JAVA] Lancer un script shell depuis Java

jerome -  
 jernux -
Bonjour,

Comment faire pour lancer un script shell (harris.sh) depuis un programme Java ?

Merci de votre aide
A voir également:

2 réponses

Utilisateur anonyme
 
Bonsoir,

Et comme ceci:

try {
Process proc = Runtime.getRuntime().exec("harris.sh");
}
catch(IOException e) {

}

? çà marche?
0
bilelm Messages postés 3 Statut Membre
 
svp c urgent
je veu savoir comment lancer un script shell avec des parametres?
et merci
0
jernux
 
non ta méthode ne fonctionne pas,malheuresement .
0
kij_82 Messages postés 4260 Statut Contributeur 857
 
system("blabla.sh");
? ca marche pas ca ?
-1
jerome
 
Non ca marche pas, il me renvoie l'erreur suivante :

ActionOK.java:18: cannot resolve symbol
symbol : method System (java.lang.String)
location: class ActionOK
System("harris.sh");
^
1 error
0