Unsupported major.minor version 52.0
This question already has an answer here:
The issue is because of Java version mismatch. Referring to the Wikipedia Java Class Reference:
These are the assigned major numbers. The error regarding the unsupported major.minor version is because during compile time you are using a higher JDK and a lower JDK during runtime .
Thus, the 'major.minor version 52.0' error is possibly because the jar was compiled in JDK 1.8, but you are trying to run it using a JDK 1.7 environment. The reported number is the required number, not the number you are using. To solve this, it's always better to have the JDK and JRE pointed to the same version.
In IntelliJ IDEA,
Restart IntelliJ IDEA.
Another approach which might help is by instructing IntelliJ IDEA which JDK version to start up with.
Go to: /Applications/IntelliJ IDEA 15 CE.app/Contents/Info.plist and replace the JVM version with:
<key>JVMVersion</key>
<string>1.8*</string>
The smart way to fix that problem is to compile using the latest SDK and use the cross compilation options when compiling. To use the options completely correctly requires the rt.jar
of a JRE ( not JDK ) of the target version.
Given the nature of that applet, it looks like it could be compiled for use with Java 1.1.
You will need to change your compiler compliance level back to 1.7 in your IDE.
This can be done in the preferences settings of your IDE. For example, in Eclipse go to menu Windows → Preferences, select Java, and expand it. Then select Compiler and change the compliance level to 1.7. I am sure this will work from there.
链接地址: http://www.djcxy.com/p/35098.html