Issue

When starting a Semarchy xDI Runtime, the Runtime terminates immediately and displays an error similar to:

java.lang.UnsupportedClassVersionError

Examples include:

java.lang.UnsupportedClassVersionError: com/semarchy/... has been compiled by a more recent version of the Java Runtime

or

Unsupported class file major version XX

Cause

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

  1. Verify the Java version used by the Runtime:
java -version
  1. Verify that the Java version is supported by your Semarchy xDI release.
  2. Ensure that the JAVA_HOME environment variable points to the correct Java installation.

Example on Windows:

JAVA_HOME=C:\Program Files\Java\jdk-21

You can verify the value with:

echo %JAVA_HOME%

or on Linux:

echo $JAVA_HOME
  1. Restart the Runtime after updating the Java configuration.
  2. 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.