你如果点中单独一个文件,那么那个选项一直都是反灰,只有你点中整个项目名,那个选项就可用了。
不是什么版本问题
用myEclipse搭建hibernate框架后,有时搞乱了某些东西后,又想重新加载Hibernate包,但此时 add
hibernate capabilities
功能菜单竟然是灰色的,不可用,尤其是初学的朋友往往要重建web项目,一切都要重新来过。
其实大可不必这么做。有个简单的方法可以解决这个问题:
切换到java的导航试图,在项目的根目录下又个项目配置文件:".project",打开后如下代码所示。
view plaincopy to clipboardprint?
<?xml version="1.0"
encoding="UTF-8"?>
<projectDescription>
<name>CourseMS</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
<?xml version="1.0"
encoding="UTF-8"?>
<projectDescription>
<name>CourseMS</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
一般在最下方有:
view plaincopy to clipboardprint?
<buildCommand>
<name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
和
view plaincopy to clipboardprint?
<nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
<nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
将这两段删除即可
分享到:
相关推荐
myeclipse自动生成hibernate映射文件
Hibernate是开始做暑假的...3, 在左侧Package Explorer里面,工程名上鼠标右键->MyEclipse->Add Hibernate Capabilities->弹出的对话框设置都用默认就好了,点击next->再next->到了设置连接的数据库参数的页面(如下图)
myEclipse使用hibernate图解
MyEclipse中配置Hibernate连接Oracle
如何使用用myeclipse自动生成hibernate配置文件
在myeclipse中配置hibernate 自动生成配置文件在myeclipse中配置hibernate 自动生成配置文件
基于MyEclipse创建的Hibernate的例子
NULL 博文链接:https://chenjingbo.iteye.com/blog/935311
使用 MyEclipse 插件创建 Hibernate + Struts 实例
该文档详细讲述了在Myeclipse环境下的Hibernate配置方法,在文章的最后还给出了一个demo,是初学hibernate的利器。中文版更有利于大家的理解,翻译的还是很不错的。
一下午才整合成功,书中的bulidSessionFactory()方法在hibernate4.3.5中已经deprecated,这里面有方法实现,用完请给好评。
Myeclipse自动生成Hibernate配置文件及实体类映射ORM配置文件--hibernate方式
MyEclipse自动生成hibernate实体类配置文件
Myeclipse中hibernate反转
MyEclipse中生成hibernate反向工程步骤
解决hibernate在MyeclipseH不能正常运行问题
myeclipse下hibernate的用法,不需要写代码一步一步往下设置即可。
自己做的一个Myeclipse Oracle9i hibernate3.2 Spring2.5 Struts2, 包删除了, 自己在myeclipse里添加就行了, 已经调试成功. 建表语句: create table CUSTOMER ( ID INTEGER not null, USERNAME VARCHAR2(12), ...
此文档是讲述在MyEclipse开发工具中加入Hibernate的全过程