// start the process command
String []cmd = {executable,param1,..,paramN}
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec(cmd);
// put a BufferedReader on the process output
InputStream inputstream =
proc.getInputStream();
InputStreamReader inputstreamreader =
new InputStreamReader(inputstream);
BufferedReader bufferedreader =
new BufferedReader(inputstreamreader);
// read the process output
String line;
while ((line = bufferedreader.readLine())
!= null) {
System.out.println(line);
}
// check for process failure
try {
if (proc.waitFor() != 0) {
System.err.println("exit value = " +
proc.exitValue());
}
}
catch (InterruptedException e) {
System.err.println(e);
}
Iran, Israele prevede almeno altre tre settimane di guerra. Colpita base
italiana in Kuwait. Trump pronto ad annunciare coalizione per Hormuz
-
La guerra tra Iran, Stati Uniti e Israele continua ad allargarsi mentre
nuovi fronti si accendono in tutto il Medio Oriente. Nella notte forti
esplosioni a...
5 ore fa


Nessun commento:
Posta un commento