Ant terminating immediately in Eclipse without any errors

Recently all ant builds started failing when started from within Eclipse without an apparent reason. When the ant target is invoked, the console briefly opens and closes again, without any message or error.

/workspace/.metadata/.log finally reveals the cause:
java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException

Some Ant classes seem to be missing, strange. A look at Window -> Preferences -> Ant -> Runtime -> Ant Home Entries reveals that all main dependencies point to an non existing Ant installation. The solution is to remove the non existing JAR files, and add them from an existing Ant installation.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.