How to Fix Unsupported major.minor Version Error in Java The Problem You get the following error when trying to run your Java program: java.lang.Unsupported Class Version Error: Unsupported major.minor version The Solution A major.minor version error occurs when the Java Runtime Environment (JRE) version used to run a program is older than the Java Development Kit (JDK) version used to compile its code.