Error opening terminal: unknown...

tarek012 Messages postés 9 Date d'inscription   Statut Membre Dernière intervention   -  
KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour,

Voici le code de erreur Vous pouvez m'aider:

package testShellScript;

import java.io.IOException;
import org.apache.commons.exec.CommandLine;
import org.apache.commons.exec.DefaultExecutor;
import org.apache.commons.exec.ExecuteException;

public class run {
int iExitValue;
String sCommandString;

public void runScript(String command){
sCommandString = command;
CommandLine oCmdLine = CommandLine.parse(sCommandString);
DefaultExecutor oDefaultExecutor = new DefaultExecutor();
oDefaultExecutor.setExitValue(0);
try {
iExitValue = oDefaultExecutor.execute(oCmdLine);
} catch (ExecuteException e) {

System.err.println("Execution failed.");
e.printStackTrace();
} catch (IOException e) {

System.err.println("permission denied.");
e.printStackTrace();
}
}

public static void main(String args[]) {
run testScript = new run();
testScript.runScript("sipp -sn uas");

}
}


Merci de bien vouloir me sortir du pétrin
Merci d'avance.
A voir également:

1 réponse

KX Messages postés 16761 Date d'inscription   Statut Modérateur Dernière intervention   3 020
 
Bonjour,

Est-ce que tu pourrais mettre la trace de l'erreur. Avec le seul message que l'on a ça fait plus penser à une erreur de Linux que de Java...
0