I know how to execute a shell command from my java app. It should be something like:
String command = "java -version";
Process proc = null;
try {
proc = Runtime.getRuntime().exec(command);
}
catch (IOException e) {
System.out.print(e);
}
I want to get the output of this command back to my java app, without printing the output to some temporary file which I then read from my app. Is this possible?