Relate to creating a Java project in Eclipse

In the "Java Project" creation wizard. There are two options for the "project layout": 1) use the project folder as root for sources and class files. 2) Create separate folders for source files and classes. Which one to choose? For "Workspace" Do I need to check "Add project to workspace"? What does it mean?

+4
source share
4 answers

I always choose Create separate folders for source and class files, just separating src files and your output files

+6
source

The one you choose is up to you. It doesn’t matter, anyway, at least with respect to your tools.

The first option means that all the files will be in the root directory of the project (usually PATH_TO_WORKSPACE/projectName ). Your .java and .class files will be here if you select this option. The second option will create PATH_TO_WORKSPACE/projectName/bin and PATH_TO_WORKSPACE/projectName/src . Your source files will be in /src , and your compiled files will be placed in /bin .

My personal preference is not to use the project folder as the root for source and class files and create separate folders for source and class files. However, it is all up to you.

+4
source

In my opinion, choose different folders for sources and binaries. This will make version and version management easier.

Working sets make sense only when you use multiple projects for the same workspace. I would suggest that you do not need working sets until you are more experienced with Eclipse.

+1
source
  • this is only an indicator of user convenience. eclipse is capable of handling both paths.
  • a work set is a way to handle an eclipse workspace when you have many projects. you don’t need it to start.
+1
source

All Articles