开发者

Invoking multiple commands using ProcessBuilder

I am invoking ProcessBuilder with the following command-line:

{"cmd.exe", "/c", "C:\\Program Files\\Micr开发者_Go百科osoft Visual Studio 10.0\\Common7\\Tools\\..\\..\\VC\\vcvarsall.bat && msbuild"}

The process throws this exception:

'C:\Program' is not recognized as an internal or external command, operable program or batch file.

If I remove && msbuild the error goes away (so this isn't an issue of quoting). Any ideas on how to make this work?


I don't have a windows machine knocking about, but my guess would be to quote the && and msbuild as separate array entries.

{"cmd.exe",
"/c",
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\..\..\VC\vcvarsall.bat",
"&&",
"msbuild"}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜