在进行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. 采用QHD分辨率使用kinect2_calibration,完成QHD图像校正

    //.................................................................................//采用QHD分辨率使用kinec ...

  2. C# 调用bat文件

    引入名称空间: using System.Diagnostics; Process proc = null; try { string targetDir = string.Format(@" ...

  3. SQL&EF优化第一篇 各种情况下的性能测试之count函数篇

    测试环境  mssql 08  +win7    数据 30W条 二〇一六年十月二十九日 09:04:43 结论:1>主键> *>可空列    推测未论证: 根据情况优先选择 顺便提 ...

  4. 冻结 锁定 固定 行 列 表头 抬头 html table jquery 全兼容常见浏览器

    转:http://www.cnblogs.com/sorex/archive/2011/06/30/2093499.html <!DOCTYPE html PUBLIC "-//W3C ...

  5. php里面的编码问题

    1 获取当前字符串的编码 $encode = mb_detect_encoding($str, array("ASCII",'UTF-8',"GB2312",& ...

  6. Laravel自定义分页样式

    <?php namespace App\Http\Controllers; use DB; use App\Http\Controllers\Controller; class UserCont ...

  7. RS232接口

    想用下板子,却发现板子和USB转串口线都是母口,无耐只能自己用线将对应的管脚连起来. 结果测试的时候发现,板子能发不能收.将板子串口的23连起来,回环正常.电脑USB转串口线上的23连起来也回环正常. ...

  8. MooseFS基础和安装

    一.MooseFS简介 1.介绍 MooseFS是一个具备冗余容错功能的分布式网络文件系统,它将数据分别存放在多个物理服务器单独磁盘或分区上,确保一份数据有多个备份副本.对于访问的客户端或者用户来说, ...

  9. 设计模式_CallBack

    一.基本概念 if you call me, i will call back 什么是回调函数  回调函数(callback Function),顾名思义,用于回调的函数. 回调函数只是一个功能片段, ...

  10. jsp的页面包含——静态包含、动态包含

    一.静态包含:包含的文件可以是jsp文件.html文件.文本文件或者一段java代码.<%@ include file="要包含的文件路径"%> 实质是先将所包含的文件 ...