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

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 550 = Java 651 = Java 752 = Java 853 = Java 954 = Java 1055 = Java 1156 = Java 1257 = Java 1358 = Java 14


IDE: Eclipse Oxygen.3

To temporarily correct the problem do the following:

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

A permanent fix likely involves installing JDK 9.

FYI 1.8 is what Java 8 is called.

Side bar

I recently returned to Java after a foray into C# (a breath of fresh air) and installed Eclipse Oxygen onto a clean system that had never had Java installed on it before. This default everything with a brand new install of Eclipse Oxygen yet somehow or other Eclipse can't get its own parameters to match the jdk that's installed. This is the second project I created and the second time I ran into this headache. Time to go back to C#?

Related Question

has been compiled by a more recent version of the Java Runtime (class file version 53.0)


You can try this way

javac --release 8 yourClass.java