繁体   English   中英

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

[英]System.ComponentModel.Win32Exception: 'The system cannot find the file specified'

相同的代码在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.

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM