1,438
edits
Changes
→Error UnsupportedClassVersionError when running TVCli
== Error UnsupportedClassVersionError when running TVCli ==
The '''UnsupportedClassVersionError''' happens because the Java version in use is no isn't the correct. Bellow a complete sample of the error output <pre>Exception in thread "main" java.lang.UnsupportedClassVersionError: com/sadig/taticview/cli/Main : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)</pre>
The Java used during TVCli execution is indicated by Windows [https://en.wikipedia.org/wiki/PATH_(variable)#DOS,_OS/2,_and_Windows ''PATH''] variable.
To determine witch version of Java is pointed by PATH variable you can use the ''-version'' JAVA parameter, we will show you bellow.
# Open [https://en.wikipedia.org/wiki/Windows_Console Windows Command Console]
# Execute java asking for his version : => '''''java --version'''''
The ''-version'' parameter should output something like bellow for Java version 8
<pre>
C:\>java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.282-b08, mixed mode)
</pre>
If Java version is bellow 8 the ''UnsupportedClassVersionError'' is thrown. You need to install a newer version, or if a never version is already installed, you need to correct de Windows PATH variable to point to newest Java.
== More doubts ? == <!--T:23-->