• Register
1 vote
35 views

Problem:

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

Solution:

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.

<natures>
      <nature>org.eclipse.jdt.core.javanature</nature>
</natures>

 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.
Thanks.

13 9 6
94,240 points

Related questions

0 votes
1 answer 11 views
11 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 15 views
15 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 2.6k points
0 votes
1 answer 42 views
42 views
Can anyone help me?
asked Jan 4 TeamScript 13.5k points
0 votes
1 answer 16 views
16 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 21 Ali 5.1k points
0 votes
1 answer 5 views
5 views
Problem : Integrate Ant builder into Eclipse: Error &ldquo;Variable references empty selection&rdquo;
asked Feb 18 Shovo210 3.1k points
0 votes
1 answer 56 views
56 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 28 views
28 views
Could anybody please let me know how to resolve this?
asked Jan 1 TeamScript 13.5k points
1 vote
1 answer 232 views
232 views
Problem : I have recently started learning Android. If I try to execute my Android project on my Eclipse ADT then I often see below errors in my Console: [Dex Loader] Failed to load C:\Users\Martin\android-sdks\build-tools\26.0.0-preview\lib\dx.jar [ ... this case "C:\Users\Martin\android-sdks" is considered as the SDK folder. Kindly help me in fixing above strange looking Android error.
asked May 21, 2020 Martin K 6.6k points