【发布时间】:2010-12-13 09:25:46
【问题描述】:
给定代码是用于在 c# 环境中运行 jar 文件的代码的一部分。 Complete Code
strArguments = " -jar "+ Argument list;
processJar.StartInfo.FileName = "\"" + @"java" + "\"";
processJar.StartInfo.Arguments = strArguments;
processJar.StartInfo.WorkingDirectory =; \\Give the working directory of the application;
processJar.StartInfo.UseShellExecute = false;
processJar.StartInfo.RedirectStandardOutput = true;
我知道 processJar.StartInfo.FileName 应该包含 jave.exe 以便在进程启动时触发相应的文件。但是上面给出的代码也可以成功运行。
问题: "\"" + @"java" + "\"" 这里是什么?如果我提供这样的输入,系统本身会搜索 java.exe 吗?
【问题讨论】:
标签: c# java process executable-jar