根本原因是项目中的一些配置包括jar包什么的根当前jdk版本(我刚开始用的是1.8的,好像是不支持低版本的springjar包),反正正确的思路是更改jdk版本是最合理的,叫我去把所有spring版本相关的jar和版本引用那是不可能的啊+.+~

下面就讲一下怎么去更改jdk的版本:

1、右键项目,选择Build Path 选择Configure Build Path进入,选中jdk,点击Edit,如下图:

2、进入Edit library中之后,由于我安装的jdk是1.8版本的,所以eclipse默认选中的是1.8,这时候我想到的是java Compiler中更改Compiler compliance level以为在这里改成1.7就完事了,其实不是这样啊!!!(eclipse这点有点坑啊),必须要把这个默认的jdk版本改成1.7才行啊,怎么改呢,很简单啊,在Edit library中点击Installed JREs,选中1.7就可以了,如图:

然后apply--finish就行了,再启动项目就OK了。

另外有一点需要说一下,Project Facets中java的版本必须配成和jdk版本一致才行,那个Dynamic Web Moudle是和Tomcat的版本挂钩的,这里可能出现的问题需要另做记录了,这里的配置也截个图:

这样这个问题就解决了。

are only available on JDK 1.5 and higher的更多相关文章

  1. zookeeper_service 出错 ........... are only available on JDK 1.5 and higher

    出错::  ContextLoader:215 ERROR - Context initialization failed org.springframework.beans.factory.Bean ...

  2. 【原创】大叔经验分享(16)Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

    今天尝试运行一个古老的工程,配置好之后编译通过,结果运行时报错: org.springframework.beans.factory.BeanDefinitionStoreException: Une ...

  3. [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML doc ...

  4. spring 2.5.6 错误:Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

    在运行一个第三方公司交付的项目的时候, 出现: Caused by: java.lang.IllegalStateException: Context namespace element 'annot ...

  5. AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher

    報錯: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML ...

  6. Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

    异常信息如下: 错误: Unexpected exception parsing XML document from class path resource [spring/applicationCo ...

  7. Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher

    Context namespace element 'annotation-config' and its parser class [org.springframework.context.anno ...

  8. …… are only available on JDK 1.5 and higher 错误

    "C:\Program Files\Java\jdk1.8.0_73\bin\java" -ea -Didea.test.cyclic.buffer.size=1048576 &q ...

  9. [转]Tomcat启动报错:AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher

    原文地址:https://blog.csdn.net/daochuwenziyao/article/details/54949151 问题描述: 控制台输出AnnotationConfigBeanDe ...

  10. Java入门到精通——调错篇之Spring2.5使用AOP时报错only available on JDK 1.5 and higher

    一.问题描述及原因. 在Spring2.5Aop例子中的时候会出现一个错误only available on JDK 1.5 and higher,大概意思就是需要JDK1.5甚至更高版本.但是我用的 ...

随机推荐

  1. WebStorm keyboard shortcuts

    ctrl + D 向下复制 下面是Webstorm的一些常用快捷键: shift + enter: 另起一行 ctrl + alt + L: 格式化代码 control + E:  光标跳到行尾 it ...

  2. C++学习笔记--友元

    C++控制对类对象私有部分的访问,在外部无法直接访问类的私有或保护成员.通常,公有类方法提供唯一的访问途径.有时这种限制太严格,不适合特定的编程问题.所以C++提供了友元这种形式,通过让函数或类成为类 ...

  3. 8种主要排序算法的C#实现 (二)

    归并排序 归并排序也是采用“分而治之”的方式.刚发现分治法是一种算法范式,我还一直以为是一种需要意会的思想呢. 不好意思了,孤陋寡闻了,哈哈! 原理:将两个有序的数列,通过比较,合并为一个有序数列.  ...

  4. AviMemDc: a C++ class

    AviMemDc: a C++ class        This class is used in the Avi Examples.The header fileAviMemDC.h /*    ...

  5. 32. Longest Valid Parentheses(最长括号匹配,hard)

      Given a string containing just the characters '(' and ')', find the length of the longest valid (w ...

  6. SecureCRT 7在ubuntu下的破解方法

    主要破解方法: http://www.boll.me/archives/599 http://www.boll.me/archives/680

  7. iOS 绘制一个表盘时钟,秒针效果可以“扫秒/游走”

    最近自己 也尝试写了一个表盘时钟,初衷源于等车时候一个老奶奶问时间,我打开手机,时间数字对我来说相对敏感,但是老奶奶是看不清的,我想识别 还是看表盘 老远 看时针分针角度就可以识别当前时间. 于是我想 ...

  8. 了解Java应用中的开发攻击

    注入式(Inject)攻击是一类非常常见的攻击方式,其基本特征是允许攻击者将不可信的动态内容注入到程序中,并将其执行,这就可能完全改变最初预计的执行过程,产生恶意效果. 下面是几种主要的注入式攻击途径 ...

  9. uboot下ext4load的用法

    将sd卡的某个分区下的某个目录里的某个文件加载到内存的某个地址,示例如下: ext4load mmc 0:1 0xa0000000 /bin/vi

  10. 使用ubifs作为根文件系统的openwrt如何在进行sysupgrade时保存旧的配置

    1.openwrt的默认方案(squashfs + jffs2) sysupgrade脚本直接调用default_do_upgrade更新设备树.内核.根文件系统,那么它是如何保存旧配置的呢?请看de ...