Hello, I am trying the examples in flink agent doc...
# flink-agents-dev
y
Hello, I am trying the examples in flink agent documents. After I submit the job, I met this error.
Copy code
Caused by: java.lang.UnsupportedClassVersionError: org/apache/flink/agents/runtime/env/RemoteExecutionEnvironment$RemoteAgentBuilder has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I am not sure which part makes the Java runtime doesn't match. Could anyone suggest possible reason?
Copy code
flink-agent-examples: build locally with jdk11
flink-agent-dist: download from official website.
flink: download from official website.
local java env:
openjdk version "11.0.28" 2025-07-15 LTS
OpenJDK Runtime Environment Zulu11.82+19-CA (build 11.0.28+6-LTS)
OpenJDK 64-Bit Server VM Zulu11.82+19-CA (build 11.0.28+6-LTS, mixed mode)
Command I run:
Copy code
./flink-1.20.3/bin/flink run -c org.apache.flink.agents.examples.WorkflowSingleAgentExample ./flink-agents-0.1.0/flink-agents-examples-0.1-SNAPSHOT.jar
x
It seems you're trying to use a Java 8 Runtime to execute the example. The class file 52.0 corresponds to Java 8, and 55.0 corresponds to Java 11. So the error basically said that you are trying to execute a Java 11 class file in a Java 8 Runtime, which is unsupported.
Are you using a Flink standalone cluster? You may want to check the Java runtime version used by the flink cluster. It's usually printed in the beginning of the JM/TM logs.
y
Thanks. Found it. the flink local standalone cluster somehow running in java 8.
x
You are welcome. BTW, could you please post usage questions like this in #C09KP5YUWE8 next time? We'd like to keep this channel for developing discussions only.
y
no problem