While trying to add a customer jar, which was developed using Java 20+, we are seeing the following error:
java.lang.UnsupportedClassVersionError: <path/file> has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0.
Service Virtualization 10.7.2
Service Virtualization 10.7.2 supports Java 8, see the Service Virtualization Release Notes - Third Party Acknowledgements:
The error that you are seeing means that a Java version mismatch has been detected.
java.lang.UnsupportedClassVersionError: <path/file> has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0.
According to Oracle's Java documentation, your custom jar was complied under Java JDK 17 (Major version 61), and the DevTest JRE only supports class versions up to release 52 (Java 8). See Java Class File Format
In order to run the custom jar, the jar needs to be compiled using the JDK 8, as JDK 17 is not supported.