导入新的工程后出现问题:The type java.lang.Object cannot be resolved. It is indirectly referenced from    required .class fi

问题的原因:

当你在Eclipse引用不同版本JDK工程时会发生该问题。由于你开发环境中应用了多个版本的JDK 或JRE导致的。Eclipse会按照最初的开发环境默认选择对应的Jre。如Eclipse上有jdk1.4开发的环境工程,当你在引入高版本jdk1.6开发的工程时,以上问题就出现了

1.配置tomcat7.0的时候自己设置了jre的版本1.8,而没有用myeclipse10自带的jre1.6,导致了出现了差错!

两种解决的办法:

1.点击windows---》preference----》搜索框上输入install JREs-----》选择myeclipse的默认路径下的jdk

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class fi

2.右击project------》properties---》java bulid  path----》libraries----》add library----》jre system library--》 Execution environment选上,finsh,之后应该看到libraries下多了系统自带的jdk,然后ok,就ok了!

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class fi

相关文章:

  • 2021-09-23
  • 2021-10-07
  • 2021-08-20
  • 2021-07-10
  • 2021-11-29
  • 2021-09-28
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2021-11-11
  • 2021-09-01
  • 2021-08-21
相关资源
相似解决方案