4
votes

I'm using an Ant build script for my project developed in Eclipse 3.4.2. It's actually a Flex 4 project (using Flash Builder Eclipse Plug-in).

Everything worked ok. But someday something happened and now the executions of Ant build script is silently terminated each time I run it.

When trying to debug Ant script the IDE stops for a moment on a breakpoint and then skips it.

Standalone Ant execution (using command line) works well for my script.

How to fix this problem? Any ideas?

5
Did you change anything lately, like the JVM version used?VonC

5 Answers

9
votes

This usually happens if:

  1. You changed the location of eclipse
  2. You changed the location of your jdk / jre
  3. Both

  1. If you changed the location of eclipse, go to Window -> Preferences -> Ant -> Runtime. Under the classpath tab, make sure the ant home entries are correct. If not, carefully locate the folder they are in (they are all in the same folder which is under the eclipse plugins folder) and add them again, then delete the invalid entries.

  2. If you changed the location of your jre / jdk:

    a) Go to Window -> Preferences -> Ant -> Runtime, and under the classpath tab, expand the Global Entries tree. Make sure the location of tools.jar is valid and is located where it says it is in the file system.

    b) Click on Run -> External Tools -> External Tools Configuration. Expand Ant Build, select each of your ant build files in the workspace, then expand the jre tab and make sure that you either have "Run in the same JRE as the workspace" checked, or your Separate JRE points to a valid installed JRE.

3
votes

I guess you found a solution, but for those whose not, I've had the same problem and the problem in my case was the workspace. The only solution that I've found has been create a new workspace.

2
votes

I had the same problem after changing "Installed JREs" under "Window -> Preferences -> Java" in Eclipse. I changed the JRE location back and it worked fine. Still investigating what happened and why this happened.

1
votes

I got around this problem by changing out of and back to the Flash perspective

0
votes

You need to change the ANT_HOME entry in Eclipse Click on new installation of Eclipse (say on Linux) Window => Prefrences => Ant (Not further below) There select Always run new Ant configuration in the same JRE as the work space Apply and build should work.

When you change the workspace, it will happen when ANT installation are different. In my case I had window workspace and ported to ubuntu It detected the old one like C:\Ant

Once above selected the ANT => Runtime => Claspath (Tab) will show /opta/sts-bundle and this is now correct entry for Ant Home Entries (Default) You can not remove it from here rather but like

Window => Prefrences => Ant (Not further below) There select Always run new Ant configuration in the same JRE as the work space