windows – Ant exec – 无法运行程序’start’CreateProcess er
发布时间:2020-12-14 04:09:56 所属栏目:Windows 来源:网络整理
导读:我无法使用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/proje
我无法使用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> 执行此生成文件时出现以下错误: Execute failed: java.io.IOException: Cannot run program "start": Cre ateProcess error=2,The system cannot find the file specified 我的env是Windows XP,Ant 1.7.1 对于如何解决这个问题,有任何的建议吗? 干杯
start不是可执行文件,而是cmd.exe shell的内部命令,所以要启动你必须执行的操作:
<exec executable="cmd.exe"> <arg line="/c start notepad" /> </exec> 编辑: 为了产生多个窗口,这应该工作: <target name="spawnwindows"> <exec executable="cmd.exe" spawn="yes"> <arg line="/c start cmd.exe /k echo test1" /> </exec> <exec executable="cmd.exe" spawn="yes"> <arg line="/c start cmd.exe /k echo test2" /> </exec> </target> 但你提到spawn =“true”不适用于你的环境,为什么呢? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在Windows中杀死子进程python
- 在Windows下为Matlab编译Shogun工具箱
- 如何在Windows上开发Apple Java Extensions?
- windows-phone-7 – 是否可以在Windows Phone应用程序提交中
- 窗户 – “你的死亡小猫等待”从哪里来?
- windows-8 – 检测Windows 8商店应用程序是否具有触摸屏
- 批处理文件 – 是否可以使用批处理文件Windows Xp将文件名的
- windows – Ant和Chef之间的部署/构建工具
- Windows安装程序 – 在CMake CPack NSIS中创建Windows桌面图
- Windows10安装anaconda
推荐文章
站长推荐
- WPF vs WinForms或Rich UI与稳定的应用程序?你对
- iis – 如何在Windows服务器上设置转发HTTP和HTT
- 如何使用LLVM在Windows上为ARM编译C程序?
- windows-server-2008 – 如何在Windows 2008 R2中
- 193:%1不是有效的Win32应用程序错误,Ruby(1.9.
- Windows上的Perl flock()在哪里?
- windows – 在不知道VID和PID的情况下读取USB HI
- 从应用程序以编程方式启动Skype和通行证号码 –
- microsoft-office-365 – Office 365 – Outlook
- Tridion:发布时无法加载.Net dll
热点阅读