最近看书写Demo,发现带main方法的类运行异常,提示信息如下:

Multi-catch parameters are not allowed for source level below 1.7,网上查了下,发现是这么说的:

报错:'<>' operator is not allowed for source level below 1.7
   这是eclipse的编译环境与项目的要求不对应造成的,这个错误一般是导入别的项目才出现的。

   由于我使用Eclipse,所以给出解决方法:

右键项目--属性--Java Compiler,取消默认选择的'J2SE-1.5',选择Compiler compliance level为你当前使用的JDK版本,这里我使用JDK 1.7。

项目运行报错提示使用低于JDK1.7版本

改为

项目运行报错提示使用低于JDK1.7版本
 

 

相关文章:

  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2021-04-22
  • 2021-09-12
  • 2022-01-18
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
  • 2021-07-17
  • 2021-12-25
  • 2022-12-23
相关资源
相似解决方案