[Master REST API with Spring Boot: From Beginner to Pro]
If you've ever wondered which JDK version corresponds to class file version 69, here’s a simple and easy way to get the correct answer without looking up a Java version – class file version mapping table:

 

Java Version = Class File Version - 44

 

This simple math is easy for everyone because the number 44 is very easy to remember: it's the last two numbers of the year before World War II ended (1944) - year 44th in the last century.

Let's apply this formula to a Java class file with version 69:

Java Version = 69 - 44 = 25

 

That means the class file corresponds to Java 25. Simple enough, right?

Notes: this formula applies only for Java version 5 or later.

Similarly, if you want to know the exact class file version that corresponds to a specific Java version, use this formula:

Class File Version = Java Version + 44



 

For example, if you’re using JDK 8, the class file version should be 8 + 44 = 52. No rocket science, right?

Anyway, if this simple math doesn't work for you, you can always refer to the following table.

 

Java Version – Class File Version Mapping:

Java / JDK Version Class File Version 
 Java 27 71.0
 Java 2670.0 
 Java 25 69.0 
 Java 2468.0 
 Java 23 67.0 
 Java 2266.0 
 Java 2165.0 
 Java 2064.0 
 Java 1963.0 
 Java 1862.0 
 Java 1761.0 
 Java 1660.0 
 Java 1559.0 
 Java 1458.0 
 Java 1357.0 
 Java 1256.0 
 Java 1155.0 
 Java 1054.0 
 Java 953.0 
 Java 852.0 
 Java 751.0
 Java 650.0 
 Java 549.0 
 Java 1.448.0 
 Java 1.347.0 
 Java 1.246.0 
 Java 1.145.3 
 Java 1.045.0 
 

For Java 1.0, the class file version is the year (last two numbers) when World War II ended (45). Then incremented by one for each Java version 1.2 (46), 1.3 (47) and 1.4 (48).

 

Related Articles:

 


About the Author:

is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.