title: How to get ProcessStartInfo with arguments from a java process By using C#?
body: <p>I am trying to get a java Process object by using C#.
  The thing is i have several java Processes running on my computer.</p>
  
  <p>Following is the way i chose to get Processes:</p>
  
  <pre><code>Process[] processes = Process.GetProcessesByName("java");
  foreach(Process proc in processes){
      //I need a filter here to get the correct process.
  }
  </code></pre>
  
  <p>The java Process is also controlled by my C# program as below:</p>
  
  <pre><code> ProcessStartInfo startInfo = new ProcessStartInfo();
   startInfo.FileName = javahome + "\\bin\\java.exe";
   startInfo.Arguments = "-jar Example.jar port=88888";
   startInfo.WorkingDirectory = "\\testFolder";
   startInfo.UseShellExecute = false;
   startInfo.CreateNoWindow = true;
   Process proc = new Process();
   proc.StartInfo = startInfo;
   proc.Start();
  </code></pre>
  
  <p>What i want is go through the array of Process to check which one has the same Arguments with the Process object that i started in another program.
  But the problem is when i did like this:</p>
  
  <pre><code> Console.WriteLine(proc.StartInfo.Arguments);
  </code></pre>
  
  <p>I found there is nothing in it, even i know it is the process that i started in another program. This confused me a lot.</p>
  
  <p>Does anyone know this issue?</p>