tags:

views:

52

answers:

2

Hi all,

I have made three java project say proj1, proj2, proj3.I have made proj2 dependent upon proj3. proj1 dependent upon proj2. Making project dependent i mean that i have given the name of the proj in the buidpath > project using Eclipse IDE.

Now as far as i know if i try import some object in proj1 then the compiler will try to find the object in the proj1 then if not found it will try to find in proj2 else it will try to found in proj3.

But in my case if the object is not there in proj1 and proj2. Compiler is not trying to find it in proj3. it is throwing copilation error it is there in proj3. Please help me out.

+1  A: 

Export Project 3 in Project 2.

  1. Go to project 2
  2. Open Project Properties -> Java Build Path
  3. Select tab Order and Export
  4. Click the checkbox beside project 3
nanda
Thanks for such quick and useful response. I am able to refer to object.
A: 

You need to tick the "export" checkbox for proj3 in the dependencies of proj2. That will export classes in proj3 to proj1 via proj2

Nat
Thanks for such quick and useful response.