[英]Win32 exception in C# application
I am using the following code:我正在使用以下代码:
Process process = new Process();
ProcessStartInfo info = new ProcessStartInfo(@"java -jar path\Ontologizer.jar -g path\go.obo -a path\gene_association.fb -m Benjamini-Hochberg -c Parent-Child-Intersection -p path\back.txt -s path\genes.txt -o path\outfull.txt");
process.StartInfo = info;
process.Start();
process.WaitForExit();
process.Dispose();
I get a Win32 exception:我得到一个 Win32 异常:
The system cannot find the file specified
该系统找不到指定的文件
How can I fix this problem?我该如何解决这个问题?
First argument of ProcessStartInfo
constructor should be file name only. ProcessStartInfo
构造函数的第一个参数应该只是文件名。 All arguments to application should be putted into second argument of ProcessStartInfo
constructor:应用程序的所有参数都应放入
ProcessStartInfo
构造函数的第二个参数中:
new ProcessStartInfo("java", @"-jar path\Ontologizer.jar -g path\go.obo -a path\gene_association.fb -m Benjamini-Hochberg -c Parent-Child-Intersection -p path\back.txt -s path\genes.txt -o path\outfull.txt");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.