are only available on JDK 1.5 and higher
根本原因是项目中的一些配置包括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的更多相关文章
- zookeeper_service 出错 ........... are only available on JDK 1.5 and higher
出错:: ContextLoader:215 ERROR - Context initialization failed org.springframework.beans.factory.Bean ...
- 【原创】大叔经验分享(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 ...
- [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 ...
- 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 ...
- AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher
報錯: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML ...
- 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 ...
- 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 ...
- …… 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 ...
- [转]Tomcat启动报错:AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher
原文地址:https://blog.csdn.net/daochuwenziyao/article/details/54949151 问题描述: 控制台输出AnnotationConfigBeanDe ...
- Java入门到精通——调错篇之Spring2.5使用AOP时报错only available on JDK 1.5 and higher
一.问题描述及原因. 在Spring2.5Aop例子中的时候会出现一个错误only available on JDK 1.5 and higher,大概意思就是需要JDK1.5甚至更高版本.但是我用的 ...
随机推荐
- PHP 基础篇 - PHP 错误级别详解
一.前言 最近经常看到工作 2 年左右的童鞋写的代码也会出现以静态方法的形式调用非静态方法,这是个 Deprecated 级别的语法错误,代码里不应该出现的.对方很郁闷,说:为什么我的环境可以正常运行 ...
- SpringBoot的核心注解和配置
一.入口类和SpringBootApplication Spring Boot的项目一般都会有*Application的入口类,入口类中会有main方法,这是一个标准的Java应用程序的入口方法. @ ...
- vmware12 安装linux centos6
内核选 2.6 中文安装选 基本系统 -> 基本, 兼 ...
- 10 Linux Commands Every Developer Should Know
转载:http://azer.bike/journal/10-linux-commands-every-developer-should-know/ As a software engineer, l ...
- Pythonic 的代码编写方法
1.模块导入 你是不是经常对调用模块时输入一长串模块索引感到头疼?说实在的,数量少的时候或许还可以勉强忍受,一旦程序规模上去了,这也是一项不容小觑的工程 #Bad import urllib.requ ...
- CodeForces - 343C Read Time (二分+贪心)
题意:有N个指针头,M个标记,用这N个针头扫描所有的标记,针头之间互不影响,求扫描完M个标记的最短时间 分析:二分搜答案,mid为时间限制,则只要所有的点在mid秒内被扫描到即可. 对于每个指针,若其 ...
- RedisTemplate访问Redis数据结构
https://www.jianshu.com/p/7bf5dc61ca06 Redis 数据结构简介 Redis 可以存储键与5种不同数据结构类型之间的映射,这5种数据结构类型分别为String(字 ...
- 高通camera结构【转】
本文转载自:http://www.cnblogs.com/whw19818/p/5853407.html 摄像头基础介绍 一.摄像头结构和工作原理. 拍摄景物通过镜头,将生成的光学图像投射到传感器上, ...
- 20145309《Java程序设计》第八周学习总结
日志 •java.util.logging包提供了日志功能相关类与接口,使用日志的起点是logger类,Logger类的构造函数标示为protected,不是java.util.logging同包的类 ...
- linux第四周
一.知识点总结 (一)用户态.内核态和中断 1.内核态:在高的执行级别下,代码可以执行特权指令,访问任意的物理地址,这时的CPU就对应内核态 2.用户态:在低级别的指令状态下,代码 只能在级别允许的特 ...