Error: a more recent version of the Java Runtime (class file version 61.0)

When trying to run a Canton or Daml SDK 3.x tool, I get the following error message:

Exception in thread "main" java.lang.UnsupportedClassVersionError:
com/daml/grpc/adapter/ExecutionSequencerFactory 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 59.0

What should I do?

Check the version of Java that you have installed.

java --version

Canton 3.x requires Java 17 or later.

The relationship between class file versions (e.g., 61.0) and Java version (e.g., 17) is documented here.

1 Like