Reputation: 117
I'm trying to set up two Java projects to have access to classes in another Java project. So far, the situation is visible in the following image:
(source: shrani.si)
However, I can't seem to import any classes from the Common project.
(source: shrani.si)
I could just have multiple packages in a single project, but as far as I know only 1 jar can be compiled per project.
Any help is greatly appreciated.
Upvotes: 0
Views: 124
Reputation: 2570
You need to add your "Common" project to libraries of project where you need to use classes from "Common" project.
For example right-click on "Clinet" project then "Properties" In right menu choose "Libraries" and press button "Add Project..." and double-click on project "Common".
After that you can add import common.Item;
Also try to clean and build all your projects.
Upvotes: 1