myeclipse导入一个工程后,出现了100多个错误,列举几个典型的问题,请大侠们看看最有可能是什么问题?

The import javax.persistence cannot be resolved
Entity cannot be resolved to a type
Table cannot be resolved to a type
GereratedValue cannot be resolved to a type
Id cannot be resolved to a type
The import javax.ejb cannot be resolved
Remote cannot be resolved to a type
Stateless cannot be resolved to a type
manager cannot be resolved
Query cannot be resolved to a type
。。。。
这个工程指定没有错,那报错的原因是什么呢?安装JBOSS的时候出现错误吗?还是其他原因,求教。

主要是因为原先项目中指定的jar文件包的路径与你本机的不符,你重新指定一下,在编译一下,错误就没了。

具体操作如下:

菜单project->project properties->Java Build Path->Libraris,

重新指定里面的jar包。
温馨提示:内容为网友见解,仅供参考
第1个回答  2010-11-01
你先把jar包编译一下
进入错误页面,ctrl+shift+o引入jar包本回答被提问者和网友采纳
第2个回答  2010-11-01
缺少jar包,包含了这些类的jar包没有导入成功吧?Entity等等
第3个回答  2010-11-01
应该是没有引入相关的jar包吧
相似回答