[英]Unsupported class file major version 61 for gradle's bootJar task
i've just upgraded java in my project to 17 version.我刚刚将项目中的 java 升级到 17 版本。 When i'm trying to build it with gradle i'm facing this error当我尝试用 gradle 构建它时,我遇到了这个错误
Execution failed for task ':project:bootJar'.
> Error while evaluating property 'mainClassName' of task ':project:bootJar'
> Unsupported class file major version 61
So , my main java conventions config has所以,我的主要 java 约定配置有
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
Also i set proper sdk to gradle config in IDEA, Gradle wrapper upgraded to 7.4我还在 IDEA 中设置了正确的 sdk 到 gradle config,Gradle 包装器升级到 7.4
Spring Boot 2.3 is not compatible with Java 17. Spring Boot 2.4 was the first version that is Java 17 compatible but it is no longer supported . Spring Boot 2.3 与 Java 17 不兼容。Spring Boot 2.4 是第一个与 Java 17 兼容但不再受支持的版本。 At the time of writing, the supported versions of Spring Boot that are compatible with Java 17 are 2.6 and 2.7.在撰写本文时,支持与 Java 17 兼容的 Spring Boot 版本为 2.6 和 2.7。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.