4

I was working in one project then created new one and after opening the old one it is not recognized as java project. There is no option to create class in package (as you see on the pic), empty middle packages are not hidden but this option is set on.

no Java Class item

Why intelij-idea does not recognize java project?

Ivan Gerasimenko
  • 2,381
  • 3
  • 30
  • 46

1 Answers1

12

Your project is fine. Your directory structure does not follow the common /src/main/java convention and you need to mark your directories manually.

In this case, you need to right-click on your directory and perform "Mark Directory As Sources Root"

Grzegorz Piwowarek
  • 13,172
  • 8
  • 62
  • 93