Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: The resource is not on the build path of a Java project

I have been given a source folder (src) of a Java Project. I have created a .project file, kept it inside that folder and imported that project into Eclipse 3.6 through the Import Existing Projects into Workspace Option and added the required jars to it.

Now the problem is that when ever I do a Call Hierarchy on a Project, it displays an alert box saying "The resource is not on the build path of a java project"

Could somebody please let me know how to resolve this?

Please see the image here:

enter image description here

Thanks

like image 792
Pawan Avatar asked Feb 27 '12 12:02

Pawan


People also ask

Where is Java build path in Eclipse?

In Eclipse select the web project and right-click Build Path > Configure Build Path. This will display the Java Build Path window.


1 Answers

You can add the src folder to build path by:

  1. Select Java perspective.
  2. Right click on src folder.
  3. Select Build Path > Use a source folder.

And you are done. Hope this help.

EDIT: Refer to the Eclipse documentation

like image 84
AbdulAziz Avatar answered Oct 01 '22 17:10

AbdulAziz