今天用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.8
勾选Use default compilance settings
OK