We get this error when we write a map reduce program in eclipse with Java 1.8 and export the Jar file where Java 1.6 or 1.7 is supported, i.e. we compile java program in higher version of Java and run in lower version of Java.
Before exporting the jar file from eclipse select the version 1.6 or 1.7 rather than 1.8. Please follow the below steps:
(i) Right Click on project and go to "Properties".
(ii) Now Select "Java Compiler" and uncheck use compliance from execution.
(iii) Select 1.6/1.7 and click on "Ok".
Now you can export the jar file and execute the code.