IllegalArgumentException when using Java 16 and higher
See original GitHub issueThe library currently cannot be used with Java 16.
When running the ClientOfMutabilityDetector
tests with Java 16 (library built locally with 1.8), it produces the following results:
Tests run: 172, Failures: 0, Errors: 26, Skipped: 1
One of the failures includes this message:
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 60
This is the build environment I used to reproduce the issue:
; mvn --version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/local/Cellar/maven/3.8.1/libexec
Java version: 16.0.1, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "11.3", arch: "x86_64", family: "mac"
In addition, when building MutabilityDetector
with Java 16, it produces the following test results:
Tests run: 371, Failures: 0, Errors: 77, Skipped: 5
Again, one of the test failures includes the message:
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 60
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
Top Results From Across the Web
IllegalArgumentException (Java SE 16 & JDK 16)
Constructs a new exception with the specified detail message and cause. Note that the detail message associated with cause is not automatically incorporated...
Read more >How to fix java.lang.UnsupportedClassVersionError
java.lang.UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime.
Read more >How to Fix UnsupportedClassVersion Error in Java - Rollbar
The UnsupportedClassVersionError in Java occurs when the JVM attempts to read a malformed or otherwise erroneous class file.
Read more >Why and How to Upgrade to Java 16 or 17 - InfoQ
First, I recommend upgrading your dependencies on the old version of Java. That way you can focus on making the dependencies work without ......
Read more >Fix: "Compiled by a more recent version" Java error - YouTube
Trying to host a server on the newest Minecraft 1.17 server, but getting an error? Using any other Java program and it's complaining...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can confirm this solves the issue. Thanks @Grundlefleck!
Apologies, I missed the notification of this. I aim to cut a new release soon (most likely using your PR).