The class was compiled by a later version of the Java Environment

When running the selenium script in the Eclipse console, the following error message appears:

The class was compiled with a later version of the Java environment (class file version 53.0), this version of the Java runtime only recognizes class file versions up to 52.0.


  • Java version: 8
  • IDE: Eclipse Oxygen
  • Firefox Version: 46
+39
source share
6 answers

This is just a version mismatch. You compiled your code using java version 9 and your current JRE version 8. Try updating the 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
+24
source

IDE: Eclipse Oxygen. 3

To temporarily fix the problem, follow these steps:

Project menu> Properties> Java Compiler> Compiler compliance level>1.8

, , JDK 9.

FYI 1.8 - , Java 8.

Java # ( ) Eclipse Oxygen , Java. Eclipse Oxygen, Eclipse jdk. , , . #?

Java Runtime ( 53.0)

+15

53 java-9, , , , javac-9, jre-8. javac-8, jre-9

+5

javac --release 8 yourClass.java
+1

"", ""> " Java"> , 1,8, .

0

gradle : → Gradle → Refresh Gradle Project.

0

Source: https://habr.com/ru/post/1689739/


All Articles