File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes ant is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant is not working" Watch "ant is not working" New topic

ant is not working

shan raj
Ranch Hand

Joined: Dec 16, 2008
Posts: 42

I have installed cygwin in my windows XP machine and add path with ant home. I am able to login into the cygwin but when i issue ant command it is throwing below issue. But the same executing fine when i issue ant.bat.

>which bash

bash-3.2$ ant
bash: /cygdrive/d/cc/../ant
/apache-ant-1.6.5/bin/ant: /bin/sh: bad interpreter: No such file or directory
bash-3.2$ ant.bat
Buildfile: build.xml does not exist!
Build failed

Could some one please help me to resolve this issue.

One more think I am wondering why it is returning /cygdrive/c/cygwin/bin/bash when we issue which bash command. It should be usr/bin/bash.

Thanks in Advance
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Why are you running Ant through Cygwin? Ant should run crossplatform, unless you have added *nix specific tasks?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
David Newton

Joined: Sep 29, 2008
Posts: 12617

You'll also need to be very careful with classpaths under Cygwin if you're running the Windows version of Java; Windows classpaths need semi-colon separators, which must be escaped under Cygwin.
shan raj
Ranch Hand

Joined: Dec 16, 2008
Posts: 42
Thank for your inputs.

I have resolved this issue by reinstalling. Now it is working fine.

I agree. Here's the link:
subject: ant is not working
It's not a secret anymore!