问题1-The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files
问题一: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的更多相关文章
- 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 ...
- 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 ...
- 部署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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 当你在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,导致了出现了差错!
- 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 ...
随机推荐
- 记录一下Junit测试MongoDB,获取MongoTemplate
只是自己记录一下,测试MongoDB帮助类时,没有配置文件的测试 public class HelperTest { MongoTemplate template; @Before public vo ...
- POJ 1101 译文
The Game 题意: Description One morning, you wake up and think: "I am such a good programmer. Why ...
- 微信小程序特殊字符转义方法——&转义&等等
在我编写公司小程序的过程中,有一次在网页端添加了一张图片,结果在小程序端访问失败了,究其原因,竟然是因为该图片名称中有一个“&”符号,网页端添加后,自动转义成了“&”存储到了数据库.当 ...
- Java 精度控制
四舍五入,保留两位小数 (找了很多种方法,都有问题,测试得出下面这种方式是可用的) String str="0.235"; String.format("%.2f&quo ...
- Tour UVA - 1347
John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a small plane and starts vi ...
- 使用composer 实现自动加载
准备工作:提前安装好composer 1.创建项目目录OOP 2.OOP目录下新建composer.json文件,composer.json是一个空json文件,代码如下: { } 3.打开控制台,进 ...
- Android常见错误整理
1.当我new class的时候,提示以下错误: Unable to parse template "Class" Error message: This template did ...
- 【Linux】swap分区简介及空间增加方式
swap分区简介 Swap分区在系统的物理内存不够用的时候,把硬盘空间中的一部分空间释放出来,以供当前运行的程序使用.那些被释放的空间可能来自一些很长时间没有什么操作的程序,这些被释放的空间被临时保存 ...
- C#调用FFMPEG实现桌面录制(视频+音频+生成本地文件)
不得不说FFMPEG真是个神奇的玩意,所接触的部分不过万一.网上有个很火的例子是c++方面的,当然这个功能还是用c++来实现比较妥当. 然而我不会c++ 因为我的功能需求比较简单,只要实现基本的录制就 ...
- hadoop单机环境配置
1.配置一台linux服务器(当前使用CentOS7)及一些基本设置 1.1在wmware下制作一台centos服务器(桥接模式) 并设置静态ip (编辑/etc/sysmconfig ...