Reputation: 597
I'm facing the issue when I imported the existing project in my STS (spring tool suite) workspace. Below is the sample folder structure of my project:
Now dao folder has few java classes , utils folder has few java classes.
When trying to import classes from com.lpa.utils.*
inside classes of dao folder its showing error (The import com.lpa cannot be resolved
) near imports. Please suggest if I need to set anything in the build path.
Please see the folder structure all the classes are inside **src-- main -- java -- ..**
. Because of that I was not able to navigate to other classes or methods using ctrl and mouse click.
Upvotes: 1
Views: 1269
Reputation: 6508
It looks like you haven't imported the project as an existing Maven project (in case it uses Maven to build, the folder structure looks like Maven). If this is indeed a Maven project, you should use the "Import as Existing Maven project" import wizard. This will import the source folder structure that you have as "source folder".
Otherwise you would have to set this up yourself in the project properties, via the Java Build Path settings page.
Upvotes: 1