How can I find the target Java version for a compiled class?

You can use the javap utility that comes with the standard JDK.

javap -verbose MyClass

Compiled from “MyClass.java”
public class MyClass extends java.lang.Object
SourceFile: “MyClass.java”
minor version: 3
major version: 45

Leave a Comment