j2ee的web工程,.project文件中,<nature></nature>作用

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解释

 从数据上看,我们可以了解到这些配置主要是描述工程的基本信息:

  1. 工程名<name></name>
  2. 工程注释描述<comment></comment>
  3. 运行时需要的额外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项目的。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值