MyEclipse异常解决

异常一:The type java.lang.Object cannot be resolved.It is indirectly referenced from required .class files。
分析解决: 出现以上信息的原因是因为你装了多个版本的jre或jdk的关系。本来MyEclipse在建立工程时,会自动参照你的jre路径,但多个版本就没办法了。只能手动建立…
a. 进入window\preferences\java\Installed JREs
1)按Add
2)输入JRE Name, 例JDK1.6
3)JRE home directory, 选择安装的路径
4)按OK
b. 进入Project\properties\Java Bulid Path
1)Add library
2)选JRE System Library后按Next
3)选workplace default JRE后按finish…

异常二:The project was not built since its build path is incomplete. Cannot find the class file for java.io.ObjectInputStream.
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .
分析解决:Myeclipse自带以个jdk1.6,我在配置jdk的时候配置的是自己本来装好的jdk1.8,所以出错 了。解决方法:Window » Preferences » Java » Installed JREs,选择myeclipse自带的jre环境

没有更多推荐了,返回首页