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

目录
相关文章
|
19天前
|
Java
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
【ERROR】‘<>‘ operator is not allowed for source level below 1.7
8 0
|
2月前
|
安全 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
|
2月前
|
测试技术
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
Could not proxy command to the remote server. Original error: timeout of 240000ms exceeded 的解决办法
161 0
|
2月前
|
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.
552 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解决办法
2787 1
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
|
Web App开发 JavaScript 安全
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
193 0
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
解决办法:configure: error: You requested SRTP (requires libsrtp) but not found...die
123 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 问题解决
157 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
1319 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:
116 0
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name: