allora ho bisogno di una mano..
ho un eseguibile che come risultato mi restituisce una stringa.. cioè se lo lancio da dos il risultato è una stringa con delle parole, come posso catturare le stringhe?
per ora ho questo per lanciare il file
codice:
import java.lang.Runtime;
import java.io.IOException;
public class fromExe {
public static void main (String args[]) {
Runtime r = java.lang.Runtime.getRuntime();
try {
String[] strArray = new String[1];
strArray[0]="C:\\file.exe";
Process p = r.exec (strArray);
}
catch (IOException e) {
System.err.println ("Error on exec method call.");
System.exit(1);
}
System.exit(0);
}
}