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

目录
相关文章
|
8月前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
98 0
|
8月前
|
Python
【已解决】WARNING: Ignoring invalid distribution xxx
【已解决】WARNING: Ignoring invalid distribution xxx
|
开发工具
WARNING: library configuration mismatch
WARNING: library configuration mismatch
374 0
|
开发者 iOS开发
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
Xcode运行报错The operation couldn’t be completed. Unable to launch xxx because it has an invalid code...
1032 0
AS 3.6 之前和之后No cached version available for offline mode 解决方法
AS 3.6 之前和之后No cached version available for offline mode 解决方法
163 0
AS 3.6 之前和之后No cached version available for offline mode 解决方法
解决办法:找不到g_type_check_instance_cast
解决办法:找不到g_type_check_instance_cast
190 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 问题解决
213 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
1576 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
|
PHP
【PHP报错集锦】 Maximum function nesting level of ‘256‘ reached, aborting!
【PHP报错集锦】 Maximum function nesting level of ‘256‘ reached, aborting!
469 0
【PHP报错集锦】 Maximum function nesting level of ‘256‘ reached, aborting!
|
Java Android开发
is not allowed for source level below 1.7 的解决办法
is not allowed for source level below 1.7 的解决办法
276 0