I thought about using the following code, but is there any cleaner way?
Process theProcess = Runtime.getRuntime().exec("java -d64 -version");
BufferedReader errStream = new BufferedReader(new InputStreamReader(theProcess.getErrorStream()));
System.out.println(errStream.readLine());