0
点赞
收藏
分享

微信扫一扫

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

水沐由之 2022-01-28 阅读 76


  今天用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


举报

相关推荐

0 条评论