How to check the Compiler Version(JDK Version) of Compiled Java class file


We 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
The major version tells the Java version used. Here are some example values:
  • Java 1.2 uses major version 46
  • Java 1.3 uses major version 47
  • Java 1.4 uses major version 48
  • Java 5 uses major version 49
  • Java 6 uses major version 50
  • Java 7 uses major version 51


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email