0

Im working with a new Eclipse Maven Java project and there seems to be 2 duplicate folders. One src/main/java and one src folder, which contains a main folder. I am confused where do I need to make my new java files? Note: Archetype definitions have not explained the difference between these two.

enter image description here

calcMan
  • 111
  • 1
  • 12
  • 1
    In the Source folder (with the little square) `src/main/java`. The `src/main` is not a source folder (no decorator). – KevinO Mar 26 '19 at 02:03
  • 1
    Possible duplicate of [What is the difference between a source folder and a (normal) folder](https://stackoverflow.com/questions/12736632/what-is-the-difference-between-a-source-folder-and-a-normal-folder) – KevinO Mar 26 '19 at 02:05
  • what is the difference between the two – calcMan Mar 26 '19 at 02:05
  • The `src/main` isn't used for compilation, the `src/main/java` with the decorate is. Look at the properties for `myprojectname` and under the Source tab in `Java Build Path` you'll see the source folders. Maven has the convention of `src/main/java`. – KevinO Mar 26 '19 at 02:07
  • Possible duplicate of [How to hide src folder from eclipse project explorer?](https://stackoverflow.com/questions/14437227/how-to-hide-src-folder-from-eclipse-project-explorer) – Gerold Broser Mar 26 '19 at 09:22

1 Answers1

0

The eclipse view can be confusing. If you go through the project on the hard disk, you see that there are no duplicate folders.

Create your source code files in `src/main/java´ and everything will be all right.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142