开发者

project dependency in java

开发者 https://www.devze.com 2022-12-16 17:22 出处:网络
I have made three java project say proj1, proj2, proj3.I have made proj2 dependent upon proj3. proj1 dependent upon proj2. Makingproject dependent i mean that i have given the name of the proj in the

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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号