views:

104

answers:

1

I'm importing an existing source tree as an Eclipse Java project. When I do, I get errors in classes (such as mycompany.logging.LogEntry) along the following lines:

The package mycompany.logging does not match the expected package ""

The problem seems to be that Eclipse does not realize that the directory src/mycompany/logging is a package directory --- instead it thinks it's a source folder in its own right, analogous to src/, and that LogEntry is part of the default package in that folder.

Can anyone advise? Thanks very much.

+3  A: 
VonC
Thanks! In the "new project" wizard, I hit the "next" button and removed redundant source folders (e.g., "src/mycompany/logging"), leaving only "src". This fixed it. Thanks again.
George
@George You are welcome. I am glad this settings worked for you.
VonC