fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.IO;
  5.  
  6. namespace test
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. Process java = new Process();
  13. java.StartInfo.RedirectStandardOutput = true;
  14. ////java.StartInfo.CreateNoWindow = true;
  15. java.StartInfo.UseShellExecute = false;
  16. java.StartInfo.FileName = "ping";
  17. java.StartInfo.Arguments = "-version";
  18. java.Start();
  19.  
  20. // version comes out null
  21. string version = java.StandardOutput.ReadLine();
  22. Console.WriteLine(version);
  23. }
  24. }
  25. }
  26.  
Success #stdin #stdout 0.03s 33952KB
stdin
Standard input is empty
stdout