Version 1.10.3 is not compatible with Java 8 runtime
See original GitHub issueTrying to run a test with mockK 1.10.3 results in the following exception being thrown:
io/mockk/proxy/jvm/dispatcher/JvmMockKDispatcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
java.lang.UnsupportedClassVersionError: io/mockk/proxy/jvm/dispatcher/JvmMockKDispatcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1008)
at java.lang.ClassLoader.loadClass(ClassLoader.java:407)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at io.mockk.proxy.jvm.dispatcher.BootJarLoader.loadBootJar(BootJarLoader.kt:32)
at io.mockk.proxy.jvm.JvmMockKAgentFactory.initInstrumentation(JvmMockKAgentFactory.kt:146)
at io.mockk.proxy.jvm.JvmMockKAgentFactory.init(JvmMockKAgentFactory.kt:34)
at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:46)
at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
Downloading the mockk-agent-jvm-1.10.3.jar artifact from bintray, and running the following command confirms that JvmMockKDispatcher is using the Java 11 class file format (version 55):
javap -verbose JvmMockKDispatcher.class | grep version
minor version: 0
major version: 55
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
I am getting '**** WRONG JAVA VERSION ****' on running ant ...
Got it!!! java 1.8.45 is not compatible with ant 1.9.1. Switched to java 1.7.67 (both jdk and jre) and everything is working fine....
Read more >Freeplane 1.10.x with Java 17 support, Groovy 4 and some ...
Freeplane 1.10 runs on Java 17 or later. Unfortunately, Java 8 and Java 17 have incompatible options and the launcher can not support...
Read more >Java SE 10 Archive Downloads - Oracle
Java SE 10 Archive Downloads. Go to the Oracle Java Archive page. The JDK is a development environment for building applications using the...
Read more >Java 8 release changes
Java 8 Release Highlights. This article applies to: Java version(s): 8.0. This page highlights changes impacting end users for each Java release.
Read more >Java SDK downloads, version 8.0 - IBM
IBM® SDK, Java Technology Edition, Version 8 contains the latest virtual machine technology from IBM. Downloads contain the latest IBM fixes ...
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
@OmarBeshary Use 1.10.3-jdk8 instead of 1.10.3.
Thanks for spotting this, going to run some tests and then release a Java 8 compatible version soon.