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.0The 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
javais still 8 or 11 — common on older CI images and machines where an LTS JDK was installed years ago. JAVA_HOME/PATHpoint 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
Check what's actually running:
java -versionInstall 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 -sharedDbOr drop the local Java requirement — the Docker image ships a compatible runtime:
docker run -p 8000:8000 amazon/dynamodb-localUpdate 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.
Related errors
- DynamoDB Local: unable to start process — other startup failures once Java itself is right.
- DynamoDB Local: sqlite4java errors — the native-library sibling.
- DynamoDB Local: port 8000 in use
- Learn: DynamoDB Local
References
- Deploying DynamoDB locally on your computer — AWS DynamoDB Developer Guide (the JRE 17+ requirement for v2.6.0+, launch command, version listing)
- DynamoDB local usage notes — AWS DynamoDB Developer Guide (
-sharedDband the other runtime options) - amazon/dynamodb-local — Docker Hub (official image bundles a compatible Java runtime)
Last verified 2026-07-13 against the official AWS documentation linked above.