Regard creating a Java project in Eclipse
In the “create a Java project” wizard. For the “project layout”, there are two choices: 1) use project folder as root for sources and class files. 2开发者_运维问答) Create separate folders for source and class files Which one should I choose? For the “Working set” Whether I need to check the “Add project to working set”? What does it mean?
I always choose Create separate folders for source and class files, it's just separate your src files and your output files
The one you choose is up to you. It doesn't matter one way or another, at least as far as your tools are concerned.
The first option means that all files will be in the root directory of the project (typically PATH_TO_WORKSPACE/projectName
). Your .java
and .class
files will be here if you choose that 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 put into /bin
.
My personal preference is to not use the project folder as the root for sources and class files and to create separate folders for source and class files. However, it's all up to you.
In my opinion, choose different folders for sources and binaries. It will make source control and versioning easier.
Working sets only make sense when you are using more than one project for one workspace. I would guess that you won't need working sets until you are more experienced with Eclipse.
- it is only a metter of user convinience. eclipse is able to handle both ways.
- working set is a way to handle eclipse workspace when you have many projects. to get started, you don't need that.
精彩评论