Has Been Compiled by a More Recent Version of the Java Runtime (Class File Version 57.0)

Class has been compiled by a more recent version of the Java Environment

This is just a version mismatch. You have compiled your code using java version 9 and your current JRE is version 8. Try upgrading your JRE to 9.

49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14
59 = Java 15
60 = Java 16
61 = Java 17
62 = Java 18
63 = Java 19

org/testng/ITestListener has been compiled by a more recent version of the Java Runtime (class file version 55.0), only recognizes version up to 52

As noted in the comments, the TestNG website says:

Requirements

TestNG Upto v7.5: JDK 8 or higher.

TestNG v7.6.0 and above: JDK 11 or higher.

So the possible solutions are:

  1. Use an older version of TestNG than v7.6.0 if you want to use Java 8 as your development platform. The TestNG version will probably be in your project's POM file.

  2. Upgrade your development platform to Java 11 or later.

  3. If you are feeling brave1, attempt to backport the version of TestNG (>= v7.6.0) that you are using to run on Java 8 (or older).


1 - This could be trivial or complicated. You won't know until you try it.

CamelContextAware has been compiled by a more recent version of the Java Runtime

The problem was here

    <dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring-junit5</artifactId>
<version>3.15.0</version>
<scope>test</scope>
</dependency>

Setting version at 3.12.0 solved for me.

Spring Boot Application has been compiled by more recent version of Java runtime

Update: I solved the issue by removing the javapath path variable and restarting.

I believe it was the following I removed:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath

File has been compiled by a more recent version of the Java Runtime error SceneBuilder

I'd say the problem are your custom components. You have probably compiled them with Java 14 and put the resulting jars into SceneBuilder. So each time when you load an FXML file which uses one of these components you will get that error message because the class file version of your components is younger than the version of SceneBuilder itself. For compatibility reasons it would be a good idea to compile your components with a target 11 anyway. You can do that with your Java 14 compiler. This would increase compatibility in general and solve your problem at hand.



Related Topics



Leave a reply



Submit