Search code examples
c#javac

Access output from java compiler in C#


I'm writing a program in C# that will compile java files using the java compiler (javac). I am having trouble capturing the output from javac (a command-line tool) to tell the user of errors. I know how to start a process and capture the standard output, but javac returns nothing. Is there any other way that I can capture the output, or better yet, get a list of errors from java compiler?


Solution

  • May be you better use error output of the process. Process.StandardError