小编Sri*_*s A的帖子

Ant exec - 无法运行程序'start'CreateProcess error = 2

我无法使用ant exec运行windows'start'.Ant版本1.7.1.

以下是重新创建问题的示例build.xml

<project name="test"  basedir="." default="test-target">
<target name="test-target">
        <exec executable="start">
            <arg line="cmd /c notepad" />  
        </exec>      
</target>
</project>
Run Code Online (Sandbox Code Playgroud)

执行此生成文件时出现以下错误:

Execute failed: java.io.IOException: Cannot run program "start": Cre
ateProcess error=2, The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)

我的env是Windows XP,Ant 1.7.1我试图从DOS提示符运行它.我排除任何与PATH相关的问题,因为我可以手动从DOS promt运行'start cmd/c notepad'.

对于如何解决这个问题,有任何的建议吗?

欢呼声

windows ant exec

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

ant ×1

exec ×1

windows ×1