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

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

问题解决的方案如下:

查看环境变量里设置的jdk版本;
找到你的工程右键点击Properties选项 出现对话框后 选择右边的Libraries选项卡 ---> 单击Add 了Library...--->

选择Jre System Library... ---> Next--->选择Alternate Jre 下的对应版本jre --> Finish ---> Ok

重新启动eclipse以上问题就可解决。

问题1-The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files的更多相关文章

  1. 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 ...

  2. 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 fi ...

  3. 部署hibernate框架项目时出现问题:The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files.

    基本情况: (这些其实关系不大)我是直接impor导入HibernateDemo项目到eclipse中的,该项目的hibernate版本是3.6.7.Final版,使用了Hibernate Tools ...

  4. 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 ...

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

    出现问题: The type java.lang.AutoCloseable cannot be resolved. It is indirectly referenced from required ...

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

    参照 http://stackoverflow.com/questions/24301986/the-type-java-lang-charsequence-cannot-be-resolved-in ...

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

    看包的路径是否对对:比如这样不对(...src/object/obietc) 其它解决方法转载: https://www.cnblogs.com/yadongliang/p/5918228.html ...

  8. 当你在web项目下新建一个class时package位置如果发生红色波浪错误,提示为”The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files“

    问题是这样的如下图: 问题的原因: 1.配置tomcat7.0的时候自己设置了jre的版本1.8,而没有用myeclipse10自带的jre1.6,导致了出现了差错!

  9. The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

    要解决的话,方法有两个 1)可以选用较低版本的sdk,比如我就用回1.6版本的sdk window->preferences->Java->Installed JREs->Ad ...

随机推荐

  1. 《疯狂Python讲义》重要笔记--变量

    一个Python解释器 接下来的旅程——你需要下载好Python,Python解释器通常放在 /usr/local/bin/python3.7 ; 在Unix系统的bash中输入 where pyth ...

  2. AE错误代码解释

    每当我们在进行AE开发,出现错误时经常会出现错误代码,但是我们并不知道它到底代表什么意思,这里的而错误编码我们可以对照着找到我们需要的时候常详细信息(问题是,经常还是会出现没有错误编码HRESULT ...

  3. 【Oracle】数据迁移工具(2):Data Dump

    Data Dump 使用命令行IMPDP/EXPDP实现导入导出表.schema.表空间及数据库.IMPDP/EXPDP命令行中可以加入以下选项,来实现更细粒度的导入导出. IMPDP/EXPDP和I ...

  4. WEB笔记-5、字体和文本

    字体样式 font-family font-size font-weight font-style font-variant font(简写) 常用字体: serif,衬线字体,每个字符笔画末端会有装 ...

  5. uni-app判断各大平台的语法

    uni-app是一款强大的前端框架,它除了pc端其他都可以实现,打包原生app.手机h5页面,微信小程序, 但是有一个问题就是本生的app和微信小程序是有一定的区别的,因为app有标题栏,返回键,而微 ...

  6. webpack学习(六)—webpack+react+es6(第3篇)

    接上篇 : webpack学习(六)—webpack+react+es6(第2篇) 上篇其实是有问题的,问题在取服务器数据这块.this.props 表示那些一旦定义,就不再改变的特性,而 this. ...

  7. Day 17 time,datetime,random,os,sys,json,pickle

    time模块 1.作用:打印时间,需要时间的地方,暂停程序的功能 时间戳形式 time.time() # 1560129555.4663873(python中从1970年开始计算过去了多少秒) 格式化 ...

  8. [转载]ext4文件系统的delalloc选项造成单次写延迟增加的分析

    转载http://www.cnblogs.com/cobbliu/p/5603472.html 最近我们的服务进程遇到kill -15后处于Z的状态,变为了僵尸进程,经过/proc/{thread_i ...

  9. HTTP 状态码 301 和 302 详解及区别——辛酸的探索之路

    转自:http://blog.csdn.net/grandpang/article/details/47448395 一直对http状态码301和302的理解比较模糊,在遇到实际的问题和翻阅各种资料了 ...

  10. SQL中IS NOT NULL与!=NULL的区别

    平时经常会遇到这两种写法:IS NOT NULL与!=NULL.也经常会遇到数据库有符合条件!=NULL的数据,但是返回为空集合.实际上,是由于对二者使用区别理解不透彻. 默认情况下,推荐使用 IS ...