Running jar file in other versions of Windows

I wrote code that should export a set of Windows registry keys. I successfully wrote the code and was also able to send the results of the code as a jar file to my email address. However, by checking the jar file (I included a piece of code in the build.xml file from the java website that will allow me to run the jar file from the dist folder ), I was able to get the desired results on my machine, because I wrote the code on Windows 8.1 machine. When testing on another machine (with Windows 8 and Windows 7 Professional), I was not able to execute the code, and the error I received was the following:

"Java Virtual Machine Launchpad, Java Error Occurred."

I used to get this error message when I didn’t include the code on the build.xml page so that the jar file exits from the dist folder, but now I get it when I execute the jar file on different machines except my own

By running it from the command line, this is what I got:

Exception in thread "main" java.lang.UnsupportedClassVersionError: smc_1/SMC_1
W1 : 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)
-1
source share
1 answer

@Sara, JVM. , jar, Java 8, Java 7 ( ). : (a) JVM Java 8 (b) 1,7 JVM, , , , Java 8. Oracle Java : http://www.java.com/en/download/help/java_update.xml

+2

Source: https://habr.com/ru/post/1746090/


All Articles