How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
Hi everyone! I'm a beginner in Java and have been struggling with this error for the second day. I'm writing a simple "Hello World" program in IntelliJ IDEA, but when I try to run it through the command line, I get this message:
```
Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorld : Unsupported major.minor version 61.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
...
```
Here's my code:
```java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
I compiled this file using javac in the project folder, and when I try to run java HelloWorld, this error appears. However, in IntelliJ IDEA itself, the program runs fine.