Java 11 uses Class File Version 55
Java 8 uses Class File Version 52
This exception means that the java application or Java Class was compiled with Java 11
where Source and Target both compatibility was Java 11.
So to resovle this issue, there are 2 solutions.
1 - Use Java 11 for compilation and for execution.
2 - When compiling change the Target Compatibility to Java 8.
(This can be done in multiple ways.)
a) Command: javac -source 11 -target 8
b) Maven: <maven.compiler.target>1.8</maven.compiler.target>
c) Eclipse: Right Click on Project -> Properties -> Java Compiler -> Java Complience Level (Change to 1.8)
D) Intellij: File -> Project Structure -> Project -> Language Level (Change to 1.8)