Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 808283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:32:16+00:00 2026-05-15T00:32:16+00:00

I have got involved in a project. This project uses ant which is not

  • 0

I have got involved in a project. This project uses ant which is not something I am comfortable with. I have checked out the source code and tried running ant on the most outer directory.

Running ‘ant’ in commando prompt takes 1 sec and I get a BUILD SUCCESFULL message. If I run ‘ant all’ I get a

BUILD FAILED. Java.io.IOExceptio: Cannot run program "ant": CreateProcess=2, the system cannot find the file specified and then a long stacktrace.

Most of the people on the project runs OS-X while I use Windows XP.

Any help or information is appreciated 🙂

EDIT:

<target name="-all-submodules">     
        <subantlight target="all">
            <filelist refid="ordered_build_files"/>
        </subantlight>
</target>

In another xml file

<macrodef name="subantlight">
        <attribute name="target"/>
        <element name="files" optional="no" implicit="true" description="Filessets/lists of build files"/>
        <sequential>
            <apply executable="ant" failonerror="true">
              <arg value="-f"/>
              <srcfile/>
              <arg value="@{target}"/>
              <files/>
            </apply>
        </sequential>
</macrodef>

This is what throws IOException when it hits the line with “apply executeable..”.

UPDATED EDIT:
If i set the absolute path like this

<macrodef name="subantlight">
            <attribute name="target"/>
            <element name="files" optional="no" implicit="true" description="Filessets/lists of build files"/>
            <sequential>
                <apply executable="MyAbsolutePathHereToAnt.bat" failonerror="true">
                  <arg value="-f"/>
                  <srcfile/>
                  <arg value="@{target}"/>
                  <files/>
                </apply>
            </sequential>
    </macrodef>

Everything works.

I have set ANT_HOME to my ant directory. I have set my JAVA_HOME to Java JDK directory. In my PATH I have set %ANT_HOME%\bin;%JAVA_HOME%\bin

Calling echo %ANT_HOME% produces the right path.

I can’t see what I am during wrong here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:32:16+00:00Added an answer on May 15, 2026 at 12:32 am

    ant with no attributes calls the default target on the build.xml file on the curent path. ‘ant all’ will call the ‘all’ target on the same build file.

    First – double check the default ant target – is it ‘all’ or something different? I guess, the default target is not ‘all’ in your case and the ‘all’ build includes a build target, that itself calls ant. And this causes the problem.

    Hard to tell from here, but scan the build file for an <ant> task inside some <target>. The IO error smells a bit like a violation of user access rights or missing files near/within this <ant> task.

    EDIT

    the build.xml starts with something like

    <project name="Name" default="compile" basedir="/src">
    

    The ‘default’ attribute names the default target. If the attribute is missing, all top level targets are executed (since ant 1.6) which should include all in your case.

    If it works ‘for everyone else’ then ‘everyone else’ might have a different environment. Have a look at the environment variable ant references in the script (like ‘env.JAVA_HOME’ and so on) and compare with the actual environment. Maybe you find a broken path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got some code to load an assembly and get all types, which
We have got loads of options for php + MySQL + Apache combo... Which
I have got a python script which is creating an ODBC connection. The ODBC
I have got the following code from here to read an Excel file using
I have got this error when using Enterprise Library 3.1 May 2007 version. We
I recently got involved in a Java project at work: we're using MyEclipse for
I've been working on a project where I have been using LinqToSQL that involved
I'm working on a project that involves some home-made (de-)serialization code, and I have
I have got myself saddled with an existing application - which attempts do do
We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.