My code looks like this:
Process p = new Process(); // Redirect the output stream of the child process. p.StartInfo.CreateNoWindow = true; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "java.exe"; //p.StartInfo.Arguments = " -jar rail.jar \"" + Path.GetTempPath() + "\\railtest.tmp" + "\" " + testString; p.Start();
Going to a command line I type "java.exe" and I get information that verifies that it exists. However any time I run this code it fails saying the file can't be found. What's going on here? Does Process not care about the computer's path variable or something? And if this is the case, how do I fix this?