Saturday, August 10, 2019

java - Unsupported major.minor version 52.0 while trying to run an exe file




GP is a .exe file that I downloaded from here. When I'm trying to run it, I receive the following error:



C:\GPP> gp -list
Exception in thread "main" java.lang.UnsupportedClassVersionError: pro/javacard/gp/GPTool : Unsupported major.minor version 52.0
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.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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)


C:\GPP>


How can I handle it? Should I remove JRE and install a newer or older version?



My Current version:



C:\GPP> java -version
java version "1.7.0_21"

Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

C:\GPP> javac -version
javac 1.7.0_21

C:\GPP>


Is it possible to force Java use an specific major.minor version to run a program?



Answer



You need to install a Java 8 runtime as the application you downloaded was compiled with Java 8 as target platform.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...