Daniel H.
Daniel H.

Reputation: 432

Maven - Project classes not recognized in Intellij

I am new to Maven and working in intellij

What I did

  1. Create new maven project
  2. Copy in my directory of java files from a previous project
  3. edit my POM for all dependencies

Intelij says it can not find my project classes when I call them from other files. (See Picture)

I have tried a re-build and clean but I can not use my project classes. Alt-Enter does not show any hope.

enter image description here

Upvotes: 1

Views: 590

Answers (1)

Gonzalo Matheu
Gonzalo Matheu

Reputation: 10064

From the picture, Node class is in the default package and Sample class in sample package.

Try putting Node in a package and import it in Sample class.

Just as a reminder the usage of default package is discouraged.

Upvotes: 2

Related Questions