• Register
1 vote


I’ve searched the question bank here but nobody asked or answer my question yet. My question might be silly to you but yeah this needs to be answered. I’ve pulled out a project from git and using Apache Ant in Eclipse.

Well, the error I am getting is, this compilation is not on the build path

Please enlighten me in this regard if possible. Thanks.

12 7 7
15,250 points

Please log in or register to answer this question.

1 Answer

1 vote


As far as I can understand, you imported the project as a general project. That’s the reason your project missing the java nature and producing the error. Either you need to add java nature in your program manually in the .project file of your workspace or go through the GUI to fix the error.


 Or go through your IDE 

  1. Right-click on your project
  2. Go to "Properties"
  3. Choose "Project Natures"
  4. Click on "Add"
  5. Choose "Java"
  6. Click "Apply and Close"

Boom! Your problem should fix now. Give it another try and let me know here the update.

13 9 6
94,260 points

Related questions

0 votes
1 answer 8 views
Problem: I cannot run my Ant build.xml since I updated to java 1.7.0_52 (or there about). but with this latest jave jdk update somethings different (?). Perhaps JAVA_HOME does not point to the JDK. Any suggestions?
asked Apr 2 ummesalma 29.2k points
0 votes
1 answer 7 views
Problem: when I am trying to compile a got the following warning: "major version 52 is newer than 51, the highest major version supported by this compiler. [javac] It is recommended that the compiler be upgraded."
asked Apr 9 ummesalma 29.2k points
0 votes
1 answer 19 views
Problem : Integrate Ant builder into Eclipse: Error &ldquo;Variable references empty selection&rdquo;
asked Feb 18 Sabbir Hossain 14.6k points
0 votes
1 answer 132 views
Problem: I am trying to compile my build.xml file but I am facing the below error: BUILD FAILED C:\Users\workspace\testrepo\src\build.xml:36: Compile failed; see the compiler error output for details.     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1150) ... to Java and Ant so unable to even understand the above error so looking for someone who can help me in fixing the above error.
asked Jul 24, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 99 views
How do I tell Eclipse where the source files folder, application.xml, and other configuration XML files are?
asked Feb 8 TeamScript 13.5k points
0 votes
1 answer 28 views
Problem: When I try to use  ctrl+space this error is shown: This compilation unit is not on the build path of a Java project. I see that there are similar topics but my work environment is Eclipse and i pull my project from Git (I import project as general project) and i use Apache Ant. Can anyone help me?
asked Feb 7 ahmedadel9090 3.1k points
0 votes
1 answer 126 views
Can anyone help me?
asked Jan 4 TeamScript 13.5k points
0 votes
1 answer 16 views
Problem: I am stuck now .. need some suggestions .. please help me .. java_home does not point to the jdk
asked Apr 18 Ifra 36.4k points