当前位置: 代码迷 >> Eclipse >> MyEclipse中Add Hibernate Capabilities 不可用的解决方法
  详细解决方案

MyEclipse中Add Hibernate Capabilities 不可用的解决方法

热度:93   发布时间:2016-04-23 00:15:58.0
MyEclipse中Add Hibernate Capabilities 不可用的解决办法
 在MyEclipse中无法新建Hibernate,我见过的有两种情况,
    一种是以前在工程中建过Hibernate,再次建立的时候,就会出现Add Hibernate Capabilities不可用,这种情况只要切换到java的导航试图,在项目的根目录下个项目配置文件:".project",打开后,一般在最下方有:
<natures>
 <nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
  <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
  <nature>org.eclipse.jdt.core.javanature</nature>
</natures>
把 hibernate相关项删除,保存。然后选中项目,在进行add hibernate capabilities操作,即可正常。

    还有一种是,在一个新的环境中(.project文件中没有<nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
),使用add hibernate capabilities ,在点击add hibernate capabilities后,Eclipse没有反应,对于这用情况,我的想法是,Eclipse版本与MyEclipse的版本不一致造成的。我用的Eclipse版本是3.3,MyEclipse版本是5.0,就会出现这种情况,当我用3.2版本的Eclipse和5.0版本的MyEclipse时,这种情况就不会再出现,顺利的进入了addhibernate capabilities 。
  相关解决方案