Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a project that i wrote for apache tomcat. I started working with eclipse i want to import the project to eclipse ide.

using eclipse 3.6.1.

when i create a new project using :

File -> New -> Other -> Java -> Java Project from Existing Ant Buildfile and i provide the build file location i get the following error:

Specified buildfile does not contain a javac task

I have a red5 project that i used the same method and it worked. what am i missing? do i need to add something to the ant build file to make it work? what exactly ? where can i find more information regarding this specific subject ?


share|improve this question
up vote 3 down vote accepted

I have run into the same problem. Eclipse is looking for the javac, and the present version doesn't know how to unravel it.

My build.xml calls other ant files. An excerpt looks like this:

  <target name="MyProject">
    <ant antfile="project.xml" target="${tgt}">
      <property name="project_name" value="MyProject"/>
      <property name="root_project_dir" value="${root_dir}/SubProj/src"/>
      <property name="cvsroot" value="${cvsroot_SubProj}"/>
      <property name="cvsmodule" value="${cvsmodule_SubProj}/src/MyProject"/>

I added a javac task between the </ant> and </target> lines:

<javac srcdir="${root_dir}/SubProj/src" destdir="C:\temp"/>

This gave Eclipse the information it needed: how to find the source files for SubProj. The javac task indicated the directory.

Unfortunately, Eclipse also added a SubProj.src to the package names. I don't know of a way to fix this other than Ctrl-1 on the package name, but this messes up the CVS saves.

share|improve this answer
In my case, the javac task was in a macro with parameters that is being invoked from the compile task. I had to workaround by making a copy of the task that inlines the macro. – haridsv Feb 23 '15 at 12:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.