Issue
When starting a Semarchy xDI Runtime, the Runtime terminates immediately and displays an error similar to:
java.lang.UnsupportedClassVersionErrorExamples include:
java.lang.UnsupportedClassVersionError: com/semarchy/... has been compiled by a more recent version of the Java Runtime
or
Unsupported class file major version XXCause
This error indicates that the Java version used to start the Runtime is not compatible with the version required by the installed xDI release.
Common causes include:
- The Runtime is using an unsupported Java version.
- The Runtime is using an older Java installation than expected.
- An environment variable points to the wrong Java installation.
- The Runtime was upgraded without updating the Java version.
Solution
- Verify the Java version used by the Runtime:
java -version- Verify that the Java version is supported by your Semarchy xDI release.
- Ensure that the JAVA_HOME environment variable points to the correct Java installation.
Example on Windows:
JAVA_HOME=C:\Program Files\Java\jdk-21You can verify the value with:
echo %JAVA_HOME%or on Linux:
echo $JAVA_HOME- Restart the Runtime after updating the Java configuration.
- Start the Runtime again and review the startup logs.
Tip: In most modern xDI installations, JAVA_HOME is sufficient and is preferred. Ensure that the configured Java version matches the version supported by your xDI release.