Eclipse - How to give dependency between projects?

后端 未结 2 1766
执念已碎
执念已碎 2020-12-05 17:49

I have two java projects in eclipse. Second one is using first one\'s jar. When I try to navigate to first one\'s class from second one, it opens .class of that

2条回答
  •  春和景丽
    2020-12-05 18:33

    Ideally, the JAR of the first project would appear under the "Referenced Libraries" of the second project. Right-click on that JAR, and choose Properties -> Java Source Attachment. Provide a variable that links to the source files of this JAR.

    Alternatively, install a decompiler plugin (see jd-eclipse) which will decompile class files when you navigate them in Eclipse, so that you can see the source.

提交回复
热议问题