The following reference to other blogs, write down their own deep impression:
Under Eclipse, Package,source Folder,folder are all folders.
The differences are as follows:
Package: When you build a package, it is automatically built into the source folder and can only be built under this directory.
SOURCE folder: Folders that store Java source code, and of course include some package folders, and can contain other files as well.
After the project is built, the Java in the source folder is automatically compiled into a class file into the corresponding/web-inf/classes folder, and the other files are moved to the corresponding directory in/web-inf/classes.
Packages are the same as Sourcefolder: The package can contain other files in addition to the Java file, and the compiled, packaged file path is different from the file path under the source folder: 1.sourceFolder by "/" to the division of the subordinate, the package depends on the "." To divide the hierarchy. 2.source folder can be built under the package, but can not be built under the source folder 3.java files are assigned according to the package path, source The folder path does not participate in the Java file's Package property assignment, and the second one concludes that all Java file package properties under the source folder are empty.
Folder: It can be placed in any file. Includes Java source files, jar files, other files (e.g., pictures, sounds, etc.). Here I explain that if there is a Java source file inside, regardless of whether the program is correct, Eclipse will not error, Treat them as ordinary files. But if the project is to use the files in it, the situation will be different.
Conversion of Package,source Folder,folder to each other
Package turns into folder display: Select Package, Build path-> Exclude
Folder turns into package display: Select folder, Build path-> Include
Package turns to source folder display: Select Package, build path-> use as source folder
source folder turns into package display: Select folder, Build path-> Remove from BuildPath
Conversion of Pacage to source folder ibid.
Eclipse Package,source Folder,folder Differences and mutual conversions