I'm taking a Java class on Pluralsite. The first exercise is, of course, an Hello World program. I'm using Intellij IDEA for my IDE. I write the program, from a template:
I run the code in the IDE. No problem. The next step is to run if from the command prompt. Per the class I put the location of the Java.exe in the JRE into my path. I reboot just to be sure. I open a command prompt as adminstrator in the directory where the program lives and start with "Java -version" and get
java version "1.8.0_241" Java(TM) SE Runtime Environment (build 1.8.0_241-b07) Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
I type "Java Main" and I get:
I type "Java Main" and I get: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 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)
Running: jdk-14 jre 1.8.0_241
I have uninstalled all things Java. Then reinstalled. I have uninstalled the IDE and reinstalled. Googled all over about this, no joy.
Another co worker is taking the course, same thing,
I will reach out to the person conducting this, but wanted to get this question out there in case he says "Works for me". Oh, Windows 10.