[英]EqualsVerifier: Unsupported class file major version 61
Java/Maven novice here, I'm trying to integrate EqualsVerifier
into my code but am getting the following error Java/Maven 新手,我正在尝试将
EqualsVerifier
集成到我的代码中,但出现以下错误
java.lang.AssertionError: EqualsVerifier found a problem in class com.me.MyClass.
-> Unsupported class file major version 61
As I understand it this means that I'm trying to load a JAR built for a different JDK than what I'm building with (17).据我了解,这意味着我正在尝试加载一个 JAR,它是为与我正在构建的 JDK 不同的 JDK 构建的(17)。 How can I pull (or build) the JDK17 version of this dependency?
如何提取(或构建)此依赖项的 JDK17 版本? My
pom
contains the following:我的
pom
包含以下内容:
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.10.1</version>
<scope>test</scope>
</dependency>
For me, it ended up being Redisson having forced an old version of byte-buddy to be loaded.对我来说,最终是 Redisson 强制加载了旧版本的 byte-buddy。 Overriding with the proper one (which I found in https://mvnrepository.com/artifact/nl.jqno.equalsverifier/equalsverifier/3.12.3 ) fixed this.
用正确的覆盖(我在https://mvnrepository.com/artifact/nl.jqno.equalsverifier/equalsverifier/3.12.3中找到)解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.