To test for certificate reads in various formats, I wrote a very simple test class with the following error:
Java.lang.UnsupportedClassVersionError:Bad version number in. class File
at Java.lang.ClassLoader.defineClass1 (Native method)
at Java.lang.ClassLoader.defineClass ( Unknown source)
at Java.security.SecureClassLoader.defineClass (Unknown source)
at Java.net.URLClassLoader.defineClass (Unknown source)
at java.net.urlclassloader.access$100 (Unknown source
at Java.net.urlclassloader$1.run (Unknown Source)
at Java.security.AccessController.doPrivileged (Native method)
at Java.net.URLClassLoader.findClass (Unknown Source)
at java.lang.ClassLoader.loadClass (Unknown source)
at sun.misc.launcher$ Appclassloader.loadclass (Unknown source)
at Java.lang.ClassLoader.loadClass (Unknown source)
at Java.lang.ClassLoader.loadClassInternal (Unknown Source)
The check was found to be due to a version inconsistency between the Java Compile level and the specified compiled JRE ;
For example, I installed the JRE specified in the 1.5 version, and compile level specified 6.0, such problems generally occur in some environments need to use 6.0, and some environments need 5.0, in the context of the switch between the two parameters did not change the result;
The solution is to set both to the same and recompile;