Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1190032
  • 博文数量: 259
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 2518
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-13 16:12
个人简介

科技改变世界,技术改变人生。

文章分类

全部博文(259)

分类: 大数据

2015-03-17 16:03:35

IOUtils.copyBytes(in, System.out, 1024,true); 提示The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files错误。

一:
It is indirectly referenced from required .class file

原因:你正要使用的类调用了另一个类,而这个类又调用了其他类,这种关系可能会有好多层。而在这个调用的过程中,某个类所在的包的缺失就会造成以上那个错误。

解决方法:导入缺失的包

二:
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

出现以上信息的原因是因为你装了多个版本的jre或jdk的关系。Eclipse在建立时,会自动参照你的jre路径,但多个版本就沒办法了。
你只能手动建立…
1. Eclipse进入window\preferences\java\Installed JREs
1)按Add
2)输入入JRE Name, 例JDK1.5.0.03
3)JRE home directory, 选择安装的路径
4)按OK
2. 静茹Project\properties\Java Bulid Path
1)Add library
2)选JRE System Library后按Next
3)选workplace default JRE后按finish...

或者卸载新版本的JDK,1.8版本的JDK会出现这样的报错。
阅读(2220) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~