UnsupportedClassVersionError

  • UnsupportedClassVersionError is thrown when the Java Virtual Machine (JVM) encounters a class file with an unsupported version.

  • This error indicates that the class file was compiled with a newer version of Java than the one being used to run it.

  • It extends ClassFormatError and provides two constructors: one with no detail message and one with a specified message.

  • Inherited methods provide functionalities for stack trace handling, error messages, and cause analysis, common to Throwable objects.

public class UnsupportedClassVersionError extends ClassFormatError

Thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.

Public Constructor Summary

UnsupportedClassVersionError()
Constructs a UnsupportedClassVersionError with no detail message.
UnsupportedClassVersionError(String s)
Constructs a UnsupportedClassVersionError with the specified detail message.

Inherited Method Summary

Public Constructors

public UnsupportedClassVersionError ()

Constructs a UnsupportedClassVersionError with no detail message.

public UnsupportedClassVersionError (String s)

Constructs a UnsupportedClassVersionError with the specified detail message.

Parameters
s the detail message.