Pb sur la methode waitFor depuis un jar
Je veux executer un point bat
Ca marche depuis eclipse mais quand je génère un jar l appli se bloque sur le waitFor
De quoi ca peut venir?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
String[] att = new String[8];
att[0] = "cmd";
att[1] = "/c";
att[2] = ConfigIni.mURLData + "\\script\\impressionperfo.bat";
att[3] = dossierPrint;
att[4] = ConfigIni.mURLImprimante;
att[5] = ConfigIni.mURLEnscript;
att[6] = nomFichierEntree;
att[7] = nomFichierSortie;
// Runtime.getRuntime().exec(att);
Runtime rt = Runtime.getRuntime();
Process proc;
try {
proc = rt.exec(att);
int exitVal = proc.waitFor();
if (exitVal != 0)
throw new ExceptionPerfo("Error in print");
} catch (Exception e) {
throw new ExceptionPerfo("Error in print");
} |