1.project文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription><name>AccidentAnalysisService</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
</natures>
</projectDescription>
2解释
从数据上看,我们可以了解到这些配置主要是描述工程的基本信息:
- 工程名<name></name>
- 工程注释描述<comment></comment>
- 运行时需要的额外Eclipse插件<natures></natures>,及其具体加载方式信息<buildSpec></buildSpec>
如果你在开发过程中向工程里面加入了很多额外的插件,则必然会导致你的Eclipse启动速度变慢。在这种情况下,你可以到这个文件里面去掉一些插件,不过这样一来你在开启那些关联文件的时候会加载那些插件。
3各nature意思
1)哥nature的意思:
1、打开项目根目录下的.project
在<buildSpec>节点下是否存在 <buildCommand> <name>org.eclipse.wst.common.project.facet.core.builder</name> <arguments> </arguments> </buildCommand> 没有就加上 在<natures>节点下是否存在 <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> 没有就加上 |
2)javanature:Eclipse 的JDT里倒是有个java nature的概念,nature是标志一个项目的属性的,既这个项目是什么项目。
java nature就是标志这个项目是java项目的。