Avatar ·

How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version?

Hi! I'm new to Java and encountered a confusing error when running a program. I have Java 8 installed (jdk1.8.0_201), and I'm writing code in IntelliJ IDEA. Everything compiles without issues, but when I try to run the compiled .class file via the command line, I get: ``` Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorld : Unsupported major.minor version 52.0 ``` Here's my simple code: ```java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } ``` I compile it like this: `javac HelloWorld.java` — and get the HelloWorld.class file. But when I run `java HelloWorld`, I get this error. What does "major.minor version 52.0" mean? Why is the version unsupported if I have