![]() ![]() From there, downloading and updating the JAVA_HOME variable to point to the newer Java version (e.g. This can be particularly useful to pinpoint which version is in use when multiple JREs are installed on the same machine. Executing the commands echo %JAVA_HOME% and java -version inside a terminal should point to the existing Java installation directory and its version number. The most straightforward solution is to update the JRE on the machine on which the code is running. This version of the Java Runtime only recognizes class file versions up to 52.0įigure 2: UnsupportedClassVersionError example Has been compiled by a more recent version of the Java Runtime (class file version 61.0), Exception in thread "main" : com/rollbar/ExampleApp UnsupportedClassVersionError Error Exampleīelow is an example of the UnsupportedClassVersionError error, indicating that the class was compiled with Java 17 (class file version 61) but executed with Java 8 (class file version 52). Class file format major versions Java SE (JDK) The message accompanying the UnsupportedClassVersionError error provides this information in the form of class file versions, which can be mapped directly to a specific Java version, using the values from the table below.
0 Comments
Leave a Reply. |