Using Javac in C#?
<p>Okay, so I've been working on this a while (and I've gone through multiple questions to get this far in the project).</p>

<p>Here's the C# code I'm using:</p>

<pre><code> Process p = new Process();
 p.StartInfo.RedirectStandardError = true;
 p.StartInfo.UseShellExecute = false;
 p.StartInfo.FileName = "javac";
 Directory.CreateDirectory(Path.Combine(Application.StartupPath + @"\TempJavaalfgwaepfgawe"));
 p.StartInfo.Arguments = "-d " + Path.Combine(Application.StartupPath + @"\TempJavaalfgwaepfgawe") + " " + files;
 p.Start();

 p.WaitForExit();
 MessageBox.Show(p.StandardError.ReadToEnd());
</code></pre>

<p>In essence, I am trying to invoke the Java compiler (javac) from a C# application. </p>

<p>Now, when I do this, it wasn't compiling the java code correctly, so I inserted the RedirectStandardError and UseShellExecute as well as the WaitForExit and MessageBox at the end to see the error that was occurring. </p>

<p>Anyways, the error is as follows:</p>

<blockquote>
  <p>javac: invalid flag: 2010\Projects\Java</p>
  
  <p>Usage: javac [options] [source files]</p>
  
  <p>use -help for a list of possible options</p>
</blockquote>

<p>So, what's wrong with my code?</p>

<p>To me, the error looks like part of the location of one of the file paths.</p>
