I'm currently trying to capture the output of a given command so I can run some cross-checking with the results (the output). Here's what I'm using now, and it doesn't work.
Process p = Runtime.getRuntime().exec("java -version");
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.InputStreamReader(p.getInputStream()));
String line = null;
for(line = br.readLine();line!=null;)
line = br.readLine();