1

Two java projects P1 and P2 in eclipse. P2 depends on P1. I perform the following actions -

P2 > Build Path > Configure build path > Add P1 > Ok.

I see that the dependency is created. BUT !!! What is happening behind the scenes ? Whatever is happening, how do I do it manually also ? Where can I learn about it ?

Thanks.

Chris Gerken
  • 16,221
  • 6
  • 44
  • 59
Apple Grinder
  • 3,573
  • 7
  • 22
  • 35

1 Answers1

1

Look in project P2 in file .classpath and you should see something like the following line somewhere in the file:

    <classpathentry combineaccessrules="false" kind="src" path="/P1"/>

This means you've added classes in project P1 to the build and execution class path for project P2. This line is "what's happening behind the scenes" to implement the configuration change. Whatever the exact line is, if you add it manually to the .classpath file then you've manually created the dependency.

By the way, in some navigation view the "dot resources", like the .classpath file, are filtered out of the view. There's a black downward-pointing triangle in the toolbar for the view. If you click on that triangle you'll see a menu item called "Filters...". If you click this item then you can uncheck "dot resource files" to remove the filter and view these files in the navigation view.

Chris Gerken
  • 16,221
  • 6
  • 44
  • 59
  • Thanks for the detailed answer. I was almost going to edit it by going to the project folder. – Apple Grinder Nov 24 '12 at 06:14
  • for more info - http://stackoverflow.com/questions/98610/how-can-i-get-eclipse-to-show-files I also suggest that the reader go to the folder and open the classpath file in a text editor to have a look at what the file actually looks like. – Apple Grinder Nov 24 '12 at 06:43