DynamoDB Local: UnsupportedClassVersionError

TL;DR — Your Java runtime is older than the one DynamoDB Local was compiled for. Current DynamoDB Local (v2.6.0 and newer, including v3.x) requires JRE 17+ — launching it on Java 8/11 makes the JVM refuse the class files with UnsupportedClassVersionError. Install a Java 17+ runtime (Temurin, Corretto, …) and re-run, or skip local Java entirely with the amazon/dynamodb-local Docker image.

What it means

Error: A JNI error has occurred...
java.lang.UnsupportedClassVersionError: com/amazonaws/services/dynamodbv2/local/main/ServerRunner
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

The numbers decode the mismatch: class file version 61 is Java 17, 52 is Java 8. The jar's bytecode targets a newer JVM than the java on your PATH, so the JVM aborts before DynamoDB Local runs a single line. AWS documents the floor explicitly: v2.6.0+ doesn't run on JREs older than 17.

Why it happens

  • The system java is still 8 or 11 — common on older CI images and machines where an LTS JDK was installed years ago.
  • JAVA_HOME/PATH point at the old JDK — a newer JDK is installed, but the shell resolves the legacy one first.
  • An upgrade of DynamoDB Local crossed the requirement — the 1.x jars ran on Java 8; replacing them with 2.x/3.x silently raised the bar to 17.
  • A build tool pins the toolchain — Maven/Gradle configured with an old toolchain launches the embedded DynamoDB Local under it.

How to fix it

  1. Check what's actually running:

    java -version
  2. Install a Java 17+ runtime (any distribution — Eclipse Temurin, Amazon Corretto, etc.) and point your shell at it:

    export JAVA_HOME=/path/to/jdk-17
    export PATH="$JAVA_HOME/bin:$PATH"
    java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
  3. Or drop the local Java requirement — the Docker image ships a compatible runtime:

    docker run -p 8000:8000 amazon/dynamodb-local
  4. Update CI images and toolchains — pin Java 17+ wherever DynamoDB Local starts (test runners, Maven/Gradle toolchains), so the error doesn't resurface per machine.

Once it boots on port 8000, point your tooling at http://localhost:8000 — the DynoTable desktop app connects to DynamoDB Local as a first-class endpoint, and the DynamoDB Expression Builder drafts the queries you'll run against it.

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Work with DynamoDB without the Console

DynoTable is a fast desktop client for DynamoDB — browse tables, run SQL-style queries, and edit items locally.