Musings on ColdFusion, Flex, Flash and other Adobe stuff

Monday, August 25, 2008

Strange Ant/Eclipse (Ganymede) error

This had me going for a long time trying to figure out what the heck was going on. Any time I tried to run an ant task from inside eclipse I would get this "waiting for virtual machine to exit" message and ant would just hang. Nothing in the console at all to tell me what was wrong.

If I ran the same thing from the command line, everything worked fine, so it must be some eclipse setup thing that's screwed up.

To make a long story short, for some reason, the ant home directory was not pointing to the ant install in eclipse.

To fix, go to window | preferences | Ant | runtime | Ant Home... and enter the path to the embedded ant install (for me, this is: C:/Program Files/eclipse/plugins/org.apache.ant_1.7.0.vblahblah

For some reason, it was pointing into my workspace directory.

Go figure.

7 comments:

Mike said...

This happened to me when upgrading to Eclipse Ganymede. When I opened my old workspace under Ganymede and tried to do and 'ant clean' it just sat there looking at me. All of my Ant jars were pointing to the old (Eclipse Europa) ant directory.

Thanks for being the top Google hit for 'eclipse ganymede ant'!

Stefan said...

Thanks mate,

you just saved me a lot of time figuring that out!

Anonymous said...

Thank you... I just found you via Google and you saved my day. Installing my workspace on a new laptop and did not understand at all why ant behaved so stupidly...

Anonymous said...

Thank you for your help. I had different problem - when trying to open build.xml in editor I was getting NullPointer exception. Spent hours looking for solutions, tried Restore Defaults to no avail. Thanks to your post look into Ant Home and it was pointing to the working directory...
XP, Ganymede

pika² said...

thanks for the help. You made my day :-).

dat pika²

ap_openid said...

I encountered this problem when moving an Eclipse installing to a different machine - thanks for taking the time to post this!

Matthias said...

KUDOS to you, saved me a lot of time!