ant自带了文档,可以看一下,一些基本的task里边都有介绍

解决方案 »

  1.   

    Exec
    Description
    Executes a system command. When the os attribute is specified, then the command is only executed when Ant is run on one of the specified operating systems....<exec dir="${src}" executable="cmd.exe" os="Windows 2000" output="dir.txt">
      <arg line="/c dir"/>
    </exec>
    see the ant's manual!
      

  2.   

    手册我看过了,好像exec会另外开个进程,与适合得到下面错误:BUILD FAILED
    file:C:/xulun/app/toyota/orddataconfirm/build.xml:37: Execute failed: java.io.IO
    Exception: CreateProcess: cls error=2指令是这样的。如果看文档能解决的话,我还来着问什么!
      

  3.   

    指令是这样写的
    <exec dir="${basedir}" executable="cls" os="Windows 2000" output="cls.txt"/>
      

  4.   

    呵呵,抱歉。
    我想csdn应该有一些超越文档之上,有自己的实践、有自己的想法的程序员。
      

  5.   

    <exec dir="${src}" executable="cmd.exe" os="Windows 2000" output="dir.txt">
      <arg line="/c dir"/>
    </exec>看懂手册了?怀疑ing,呵呵
    理解了上面的命令再问吧
    建议把这个执行下下次提问题前看看这个:
    http://expert.csdn.net/Expert/topic/2106/2106576.xml?temp=.4863397
      

  6.   

    上面的指令其实是在另一个进程里执行的,与该进程毫不相关。
    如果你仔细阅读了前面的贴子,该点我已经说过了。
    我要的是能在ant执行的窗口实现清屏,拜托你搞清楚。