Search code examples
javaeclipse

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


While running a script, I am getting the following error message in the 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 v4.7 (Oxygen)
  • Firefox version: 46

Solution

  • 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
    64 = Java 20
    65 = Java 21