System.ComponentModel.Win32Exception:'系统找不到指定的文件'

时间:2019-02-27 20:29:18

标签: c#

相同的代码在Windows 10中有效,但在Windows Server 2012 R2中无效。

        ProcessStartInfo start = new ProcessStartInfo();

        start.FileName = "java";
        start.UseShellExecute = false;
        start.CreateNoWindow = true;
        start.RedirectStandardOutput = true;
        start.RedirectStandardError = true;

        start.Arguments = @"-jar avro-tools-1.8.2.jar tojson input.avro";

        using (Process process = Process.Start(start))
        //in above line is where the error appears.

我检查了路径,没关系。我从命令行运行它,并且正在工作。不知道还要检查什么。

1 个答案:

答案 0 :(得分:0)

最后,解决方案是添加一个新的配置文件x64,并使用它运行调试器。

相关问题