不小心点到build path中的Use as Source folder,如何取消呢?
选择build path-> Remove from BuildPath
延伸:
每次建java Project或web Project的时候都会有一个src文件夹,这个文件加就是下面所说的source folder,下面可以新建多个package。
1、source folder:存放java源代码的文件夹,当然也包括一些package文件夹,还可以包含其他文件.
项目构建后,source folder里面的java自动编译成class文件到相应的/web-inf/classes文件夹中,其他文件也会移到/web-inf/classes相应的目录下.
2、source folder下能建package,而package下不能建source folder
package:当你在建立一个package时,它自动建立到source folder下,也只能建立在这个目录之下.
3、folder: 里面可以放入任何文件.
package,source folder,folder 之间相互转换
pacage 与 folder 的转换如下:
package 转成 folder 显示:选中package, build path-> Exclude
folder 转成 package 显示:选中folder, build path-> Include
pacage 与 source folder 的转换如下:
package 转成 source folder 显示:选中package, build path-> Use as Source folder
source folder 转成 package 显示:选中folder, build path-> Remove from BuildPath