is not allowed for source level below 1.7 的解决办法

简介: is not allowed for source level below 1.7 的解决办法

今天用Eclipse导入了一个工程,发现了一个错误:


catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e)


 这写法没见过。提示is not allowed for source level below 1.7。



 解决办法:


 右键项目--属性--Java Compiler--勾选Enable project specific settings


 Compiler compliance level--选择1.7


 勾选Use default compilance settings


 OK

目录
相关文章
|
6月前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
75 0
|
缓存 关系型数据库 MySQL
【异常解决】缓存报错:Null key returned for cache operation (maybe you are using named params on classes withou
【异常解决】缓存报错:Null key returned for cache operation (maybe you are using named params on classes withou
753 0
|
开发工具
WARNING: library configuration mismatch
WARNING: library configuration mismatch
332 0
|
Java Spring
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
3616 1
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
subclipse同步冲突问题A conflict in the working copy obstructs the current operation
subclipse同步冲突问题A conflict in the working copy obstructs the current operation
106 0
subclipse同步冲突问题A conflict in the working copy obstructs the current operation
|
Java Android开发
is not allowed for source level below 1.7 的解决办法
is not allowed for source level below 1.7 的解决办法
208 0
解决办法:找不到g_type_check_instance_cast
解决办法:找不到g_type_check_instance_cast
172 0
|
网络协议 关系型数据库 Linux
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
190 0
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
[Error] ‘for’ loop initial declarations are only allowed in C99 or C11 mode [Note] use option -std=c99,-std=gnu99,-std=c11 or-std=gnu11 to compile your code
1527 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
|
Web App开发 Java
错误:Reference file contains errors http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsdv......
引用:http://topic.csdn.net/u/20070125/18/8d676afd-868a-4c2d-9a1b-07eed6b5683d.html   6楼 xsi:schemaLocation= "http://java.
1548 0