Trying to run ANT as part of XCODE development project

Hi all,

New to development and am just getting started with a new Xcode project. All I want to do is run the "Hello World" java project that is created by default and I keep running into an error with ant. First it was the wrong path - error: can't exec '/usr/bin/ant' (No such file or directory)
Finally figured out how to change the Target to point to ant and now I get this error:

error: can't exec '/usr/share/ant' (Permission denied)

I have tried typing 'ant' in Terminal and I get -bash: ant: command not found
Obviously I have some problem with my ant installation but have repaired permissions numerous times, reinstalled Xcode and looked at permissions in Terminal -
drwxr-xr-x 11 root wheel 374 Jun 28 08:05 ant
I have set my default user account with admin privileges. Can anyone offer some suggestions?

I have not found the Xcode developer forum, seems that there is only an iPhone development area...

Bryan

MacBook Pro, Mac OS X (10.5.7)

Posted on Jul 13, 2009 9:47 AM

Reply
3 replies

Jul 13, 2009 9:57 AM in response to bryanleister

Java support in Xcode is really not Apple's priority. You can get it to work, but since Xcode isn't cross platform, most Java people just use Eclipse or the command-line. Or at least, I guess they do.

I do know that ant is installed at /usr/bin/ant. Why can't you find it. How did you install Xcode? Did you install everything, or only bits and pieces? You must install it all.

I am guessing that must be the problem. I just tried two Java templates and they both worked fine for me.

Sadly, there is no iPhone development area. There is only an Xcode development forum. The iPhone people have pretty much taken it over. They have their own restricted iPhone forums, but for some reason, they want to post here too. You probably don't need to repost. Anyone in the development forum would probably troll the Unix forum too.

Jul 13, 2009 10:40 AM in response to etresoft

Thanks, I think I will just use Eclipse. At least I was able to get "Hello World" up and running with it. I did install the complete Xcode and am registered as a developer so have found the forums. It appears that the Xcode forum is 100% iPhone development so Ant is not really important to that.

Very frustrating working with Xcode, not much help in getting it configured in any documents I can find. Ant should be in usr/bin/ant but it is not, it is in usr/share/ant. As it is now part of OSX I don't want to try to move it or install it. I did do the full Xcode installation and reinstallation, first from my Leopard disc and then downloaded it from the developer site. I may try to uninstall it one more time and make double sure that I have checked everything to be installed.

Bryan

Jul 13, 2009 11:05 AM in response to bryanleister

bryanleister wrote:
Thanks, I think I will just use Eclipse. At least I was able to get "Hello World" up and running with it. I did install the complete Xcode and am registered as a developer so have found the forums. It appears that the Xcode forum is 100% iPhone development so Ant is not really important to that.


There are a few Java questions every now and then.

Very frustrating working with Xcode, not much help in getting it configured in any documents I can find. Ant should be in usr/bin/ant but it is not, it is in usr/share/ant.


Perhaps you should review your installation. Ant is at /usr/bin/ant on my system. That is a symbolic link into /usr/share/ant/bin/ant. All the Java templates work fine for me.

As it is now part of OSX I don't want to try to move it or install it. I did do the full Xcode installation and reinstallation, first from my Leopard disc and then downloaded it from the developer site. I may try to uninstall it one more time and make double sure that I have checked everything to be installed.


I think the most recent version Xcode now supports "relocation" and multiple versions. Perhaps you have some part of that enabled and your executables and links aren't in the typical spots. I'm just guessing.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Trying to run ANT as part of XCODE development project

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.