the command line window flickers open and then closes, without a chance to see what's going on
Use "cmd.exe /K ...
instead of "cmd.exe /C ...
.
I think that your actual problem is either access permissions or not having java.exe
in the PATH
of the ASP.Net user.
Use this code:
System.Diagnostics.Process.Start(
new ProcessStartInfo {
FileName = "java.exe",
Arguments = "-jar compiler.jar --js JSTest/hello.js --js_output_file JSTest/hello-compiled.js",
WorkingDirectory = HttpRuntime.AppDomainAppPath,
UseShellExecute = false
}
);