Here are the major version of every JRE released so far :
Java SE 8 = 52,
Java SE 7 = 51,
Java SE 6.0 = 50,
Java SE 5.0 = 49,
JDK 1.4 = 48,
JDK 1.3 = 47,
JDK 1.2 = 46,
JDK 1.1 = 45
You can see that Java 8 has major version 52
。
which means if you run javac command from Java 8 installation, it will by default generate a class with major version 52.
If you run this class file in JRE 7, you will get "Unsupported major.minor version 52.0".
Same is the case with an applet compiled in JDK 1.8, running in a browser with JRE 1.7
Read more: http://javarevisited.blogspot.com/2015/05/fixing-unsupported-majorminor-version.html#ixzz3uUfe4BbX
翻译一下就是:使用jdk8编译的class文件,使用jre1.7运行的时候就会报该异常。