在进行Eclipse开发的时候,经常会遇到一些小问题,现在开始每天积累一些小问题的解决方法。出现:JRE not compatible with workspace .class file compatibility: 1.7这个错误的原因是,JRE库配置与Java Compiler设置不一样,如图:
这是项目加载的jre依赖库,而下却是Java Compiler设置的jdk为1.7。
所以这个问题只需要在这个图上,勾选Enable project specific settings,然后在1.7下拉框下选择1.6,点击Apply,接着OK,这样这个问题就真的okay了!
 
出现这个问题的原因是,在本机上安装了两个不同版本的jdk,(1.7被设入环境变量)但是为了兼容某些环境,需要将默认的jre系统库改为1.6,所以单单改变build path,还是会出现与compiler不一致的情况,当然这是在项目开始编译的时候使用1.7,而后为了需求改为1.6后所导致的!

JRE not compatible with workspace .class file compatibility: 1.7的更多相关文章

  1. eclispe设置workspace text file encoding

    在windows下开发,经常会遇到eclipse新导入的工程 java代码中的注释或者字符串中文显示乱码,每次都要一个个项目更改麻烦,特地找了下,可通过如下方法一次性设置.

  2. Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.

    错误信息: Description Resource Path Location TypeBuild path specifies execution environment J2SE-1.5. Th ...

  3. Deploying JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite Release 12 (文档 ID 393931.1)

    In This Document Section 1: Overview Section 2: Pre-Upgrade Steps Section 3: Upgrade and Configurati ...

  4. [转]Unable to build: the file dx.jar was not loaded from the SDK folder!

    本文转自:http://www.developerbits.com/tag/unable-to-build-the-file-dx-jar-was-not-loaded-from-the-sdk-fo ...

  5. eclipse工作区(workspace)常用设置(preferences)

    切换工作区 新建一个作为工作区的文件夹 File -> Switch Workspace -> Other... -> browse,定位到新的指定工作区文件夹即可. 切换到新的工作 ...

  6. Linux C/C++ --- “” and <> in the use of head include file(Pending Verification)

    for example: #include <stdlib.h>#include <stdio.h>#include <wiringPi.h>#include &l ...

  7. New text file line delimiter

    Window -> Preferences -> General -> Workspace : Text file encoding :Default : 选择此项将设定文件为系统默 ...

  8. file.getPath() getAbsolutePath() getCanonicalPath()区别

    package file; import java.io.File; import java.io.IOException; public class getFilePath { public sta ...

  9. Eclipse常用设置

    用惯了VS,再回过去用Eclipse真是一件痛苦的事.so,在这里记录下使用过程中的一些设置以做备忘. 1.代码自动提示 在我们忘记方法名或者想偷懒时,代码自动提示很管用.不过Eclipse默认是输入 ...

随机推荐

  1. 详解Android中那些酷炫返回方式的实现

    Android手机都会有返回键,不管是实体键,还是虚拟键.Android用户主要也都是通过这个返回键操控页面返回方式的,不比IOS逼格甚高的只保留一个操作键.这种方式是最普遍的返回方式,还有一种也是比 ...

  2. jquery删除一个元素,但保留里面的元素

    删除元素/内容 如需删除元素和内容,一般可使用以下两个 jQuery 方法: remove() - 删除被选元素(及其子元素) empty() - 从被选元素中删除子元素 但是如果我想删除这个元素,但 ...

  3. SUSE11SP3--安装svn

    SUSE上安装新版本的subversion是一件很麻烦的事情,涉及到的依赖太多,包括需要更新部分工具的版本. 为了以较小的代价安装subversion,我决定在SUSE11下安装 subversion ...

  4. 通过使用JanusGraph索引提高性能

    翻译整理:纪玉奇 Extending JanusGraph Server JanusGraph支持两种类型的索引:graph index和vertex-centric index.graph inde ...

  5. mac svn 命令

    https://www.cnblogs.com/luckythan/p/4478706.html http://blog.csdn.net/aizhiqiang2/article/details/53 ...

  6. Docker Python API 与 Docker Command

    span.kw { color: #007020; font-weight: bold; } code > span.dt { color: #902000; } code > span. ...

  7. 分布式系统的CAP和BASE理论

    1. 背景 网络分区:俗称“脑裂”.当网络发生异常情况,导致分布式系统中部分节点之间的网络延时不断变大,最终导致组成分布式系统的所有节点中,只有部分节点之间能够进行正常通信,而另一些节点则不能. 当网 ...

  8. NSArray、NSMutableArray和NSMutableDictionary的用法

    转自:http://www.cnblogs.com/wangpei/admin/EditPosts.aspx?opt=1 NSArray是静态的数组,就是它所指向的内容是不可改变的,它指向一段内存区域 ...

  9. Fatal error compiling: 无效的标记: -parameters

    [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ ...

  10. MySQL 行号(类似SQLServer的row_number())

    Select ID,(@rowNum:=@rowNum+1) as RowNo From a,(Select (@rowNum :=0) ) b