Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to create java package in maven project imported in Intellij

I've imported a maven project into Intellij and added a module to the src directory. But now I discovered that I cannot add a java package to new directory as I can with other projects, i.e., whenever I right click on the newly added directory, Intellij does not give me the possibility to add a java package. It would seem that this is a setting issue but I cannot find the setting that would control this. I'm using the community edition of Intellij: 2018.3

like image 830
Shejo284 Avatar asked Sep 04 '25 17:09

Shejo284


1 Answers

Your problem is your src folder not marked as sources folder . Try below step

  1. From the main menu, select File | Project Structure(Ctrl+Shift+Alt+S) and click Project Settings | Modules.

  2. Select the src folder mark with sources folder.

Now you can able to create the Packages under src

like image 61
soorapadman Avatar answered Sep 07 '25 09:09

soorapadman