0
votes

I am working on a existing Java project within Eclipse Oxygen.

I have :

  • Project A "src/main" that contains an interface "Constant" in package "azerty" (it's an example).
  • Project B "src/test" that contains an interface also called "Constant" in package also named "azerty". In my "src/main" folder (still in project B), I try to import azerty.Constant.

The problem is that Eclipse imports the interface that belongs to project B "src/test" and not project A "src/main".

How can I force Eclipse to use the interface form project A?

PS: I'm not allowed to rename one of those packages.

1

1 Answers

0
votes

Check which project is added to your current project.

To add project A interface. Select your current project. Right-click on it-> Build Path -> Configure Build Path -> Projects Tab -> Select Project A -> Now Use your Project A interface.