在eclipse中新建java问题报错:The type XXX cannot be resolved. It is indirectly referenced from required .class files

在Eclipse中遇到The type XXX 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。

解决方法:手动修改项目引入的jdk版本

原文地址:https://www.cnblogs.com/cocoxu1992/p/10966580.html

时间: 2024-11-10 21:48:00

在eclipse中新建java问题报错:The type XXX cannot be resolved. It is indirectly referenced from required .class files的相关文章

eclipse中java文件报错:The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files

问题:The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files 大概意思就是.class文件引用错误, 联想一下 编译出了问题, JRE问题. 解决办法:先在Java Bulid Path中把所有的JRE先remove掉,然后重新引入JRE即可.( 右键工程 > Build Path > Configure Build Path > )

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

在用eclipse开发中,有时候需要导入别人的项目进行学习研究偶尔会出现代码无端端显示一大推错误,甚至连包名都出错的情况,这是后把鼠标移动到包名,系统就会弹出The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files的提示 原因是jdk出错. 解决方法是:更换一个jdk,操作步骤:project->properties->Java Bulid Path

The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files

最近在做J2ME开发项目,配置环境一切OK,但是打开项目时某些文件提示: The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files,经查阅是因为环境中的JRE冲突引起的,我是通过以下方式解决了问题. 在Eclipse上依次打开Windows->Preferences->Java->Build Path->User Libraries,清空列

Java微信开发_Exception_01_The type org.xmlpull.v1.XmlPullParser cannot be resolved. It is indirectly referenced from required .class files

一.源码: package com.souvc.weixin.util; import java.io.InputStream; import java.io.Writer; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.dom4j.Document; import org.dom4j.E

The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files

问题描述 Exception in thread "main" java.lang.Error: Unresolved compilation problems: The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files The method getText() from the type TagNode refers to the

在eclipse中新建jsp就报错

新建了一个web工程,之后建立了jsp页面,刚建立完成,文件开头就报错:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path. 找到新建页面所在的工程名字,然后左键选中,右键弹出功能菜单,选择Build Path,进入配置路径. 在java build path 页面的下选择Libraries栏目(默认选择),点击右侧的Add Library 按钮,进入添加类库. 在添加

Java.报错:The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files

The type java.lang.CharSequence cannot be resolved 这个错误一般是由于需要JDK1.8, 但Eclipse或MyEclipse版本过低(本例中是MyEclipse6.0, 欲使用JDK1.8) 解决办法:升级MyEclipse, 或改用Eclipse 原文地址:https://www.cnblogs.com/visionsl/p/12207867.html

The type java.lang.AutoCloseable cannot be resolved. It is indirectly referenced from required .class files

出现问题: 原因: 这是一个“类型到java.lang.charsequence不能解决”的错误.这个主要是由于MyEclipse引用了不同版本的jdk工程印发的问题.我们都知道,每次新建一个工程时,MyEclipse都会让我们选择要使用的jdk版本,而我的电脑上有jdk1.6和jdk1.7和jdk1.9三个版本.所以当电脑上有多个版本的jdk时,开发环境会自动选择默认的Jre.所以我们通过以下的方案来解决这个错误: 解决方案:更换IDE或者更改JDK. 我提供一种解决方法:更换JDK版本. 具

The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

JDK版本的问题. 解决方法: 原来jdk1.8不向下兼容,用回1.6的就可以了. 下图有三个jdk,前两个自己装的,第三个MyEclipse自带的.