1

Trying to create a new submodule(the second one in the picture)under the parent module(the first one in the picture), but when I right clicked the main file of it, it did not allow me to create class files. Created a submodule (the third one)before this, but did not encounter the same problem. Making it a source root resolved the problem, but I do not know what that really does to my project structure, so I am not willing to use that. You can also see that the second module does not come with a target file, and its resources folder looks different. enter image description here

Adam
  • 257
  • 3
  • 12

1 Answers1

1

Target directory appears after you build the project. When a Java project is imported from pom.xml, default source and resource directories should be configured automatically for you. If you create a module manually without importing it from Maven, you have to set the source roots yourself. See the related answer for details.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904