Rofael Emil

Rofael Emil

  • NA
  • 1
  • 2k

ASP.NET Compiler

Jan 26 2012 9:07 AM
I'm trying to make an online compiler for java using ASP.NET C#


Process p=new Process();
p.StartInfo.FileName = "C:\\Program files\\Java\\bin\\javac.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.Arguments = "C:\\Hello.java";
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardOutput.ReadToEnd();
p.WaitForExit();

I run javac.exe to compile Hello.java, but the process isn't allowed by ASP.NET to write Hello.class to disk

But on doing it manually through cmd.exe without using ASP.NET or progmatically using C# only it runs perfectly

Can you help me make an online java compiler using ASP.NET or PHP for compiling Algorithmic assignments?

Answers (1)