Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this symbol mean in IntelliJ? (red circle on bottom-left corner of file name, with 'J' in it)

You need to specify the source dir

File> Project Structure > Modules

click the directory and click the Sources button

It's weird because usually it's done automatically. Maybe it's better if you recreate the project again.


If it is a maven project

  1. right click on the pom.xml
  2. Add As Maven Project

Thanks


The first answer from irreputable above that starts out with "you need to specify the source dir" is correct, but I don't see him telling you the easy way to do so.

Simply right click on the java sources folder ("java" under src/main/java if it is a Maven project for example) and select Mark Directory As > Sources Root (see screenshot below).

enter image description here


This situation happens when the IDE looks for src folder, and it cannot find it in the path. Select the project root (F4 in windows) > Go to Modules on Side Tab > Select Sources > Select appropriate folder with source files in it> Click on the blue sources folder icon (for adding sources) > Click on Green Test Sources folder ( to add Unit test folders).