title: Getting console output from jar in c#
body: <p>i have a jar which if i run from the command line returns me a true or false printed to the console</p>
  
  <p>i am trying to run this from c# and obtain the result - this is being done like this</p>
  
  <pre><code>Process p = new Process();
  p.StartInfo = new ProcessStartInfo("java", @"-jar test.jar " + paramterForStringArgs[0]);
  p.StartInfo.RedirectStandardOutput = true;
  p.StartInfo.UseShellExecute = false;
  p.Start();
  String s = p.StandardOutput.ReadToEnd();
  p.WaitForExit();
  Trace.WriteLine("data = " + s);
  return false;
  </code></pre>
  
  <p>I seem to be always getting an empty string and was wondering why this might be, or if there was a better way of doing it?</p>