ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Can't get <exec> to work
Date Thu, 04 Oct 2001 17:22:20 GMT
I just promoted this to a FAQ at jGuru (it takes an hour or so for it to
appear as an FAQ), but here's a link to the forum entry:

    http://www.jguru.com/forums/view.jsp?EID=503205

(answer a few entries down)

    Erik

----- Original Message -----
From: "Chris" <chris@ooc2000.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, October 04, 2001 10:01 AM
Subject: Can't get <exec> to work


> Hi all,
>
> I was just messing around with <exec>, with an eye towards using Ant to
> take over building some C projects. Here's my simple build file:
>
> <project name="DirAnt" default="init">
>          <target name="init">
>                  <exec executable="dir"/>
>          </target>
> </project>
>
> The error I get when I try and run it is below. I've using Windows 2000,
> and Sun's JDK 1.3.1.
>
> Any ideas?
> Thanks,
> Chris
>
> ------------ Error message -------------------
>
> P:\dev\lab\ant>ant -buildfile dir.xml
> Buildfile: dir.xml
>
> init:
>
> BUILD FAILED
>
> P:\dev\lab\ant\dir.xml:4: Execute failed: java.io.IOException:
> CreateProcess: dir error=2
> --- Nested Exception ---
> java.io.IOException: CreateProcess: dir error=2
>          at java.lang.Win32Process.create(Native Method)
>          at java.lang.Win32Process.<init>(Win32Process.java:66)
>          at java.lang.Runtime.execInternal(Native Method)
>          at java.lang.Runtime.exec(Runtime.java:551)
>          at java.lang.reflect.Method.invoke(Native Method)
>          at
>
org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.jav
a:509)
>          at
org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:329)
>          at
org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:228)
>          at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:162)
>          at org.apache.tools.ant.Target.execute(Target.java:153)
>          at org.apache.tools.ant.Project.runTarget(Project.java:898)
>          at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>          at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>          at org.apache.tools.ant.Main.runBuild(Main.java:421)
>          at org.apache.tools.ant.Main.main(Main.java:149)
>
> Total time: 0 seconds
>
>


Mime
View raw message