java报错 exception is java.lang.IllegalArgumentException: Unsupported class file major version 65

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [G:\后端\springboot项目\基础spring boot+vue+uniapp的外卖点餐小程序\项目脚手架\takeaway\springboot\target\classes\com\example\SpringbootApplication.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [G:\后端\springboot项目\基础spring boot+vue+uniapp的外卖点餐小程序\项目脚手架\takeaway\springboot\target\classes\com\example\SpringbootApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 65

错误截图:

java报错 exception is java.lang.IllegalArgumentException: Unsupported class file major version 65_第1张图片 解决方法:

点击settings->build->compiler->java compiler->per-module bytecode version: 设置target bytecode version 的版本为8 preject bytecode version的版本为8

java报错 exception is java.lang.IllegalArgumentException: Unsupported class file major version 65_第2张图片

 然后在启动项目测试:

java报错 exception is java.lang.IllegalArgumentException: Unsupported class file major version 65_第3张图片

这样就成功啦

你可能感兴趣的:(开发中的错误解决,java,开发语言)