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

目录
相关文章
|
5月前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
51 0
|
6月前
|
安全 Java 应用服务中间件
A configuration error occurred during startup.Please verify the preference field with the prompt: To
A configuration error occurred during startup.Please verify the preference field with the prompt: To
|
网络安全 Docker 容器
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule
102 0
|
开发工具
WARNING: library configuration mismatch
WARNING: library configuration mismatch
304 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解决办法
3503 1
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
140 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 问题解决
182 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
1481 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
|
应用服务中间件 Android开发
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
136 0
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
|
Java Android开发
is not allowed for source level below 1.7 的解决办法
is not allowed for source level below 1.7 的解决办法
256 0