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

user5218071 picture user5218071 · Nov 23, 2017 · Viewed 219.9k times · Source

While running selenium script, I am getting the following error message in Eclipse console:

Class has been compiled by a more recent 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

Answer

Nithin picture Nithin · Nov 23, 2017

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