I created demo application of Spring boot, and now try to run generated jar file, but I get the following error
C:\Users\User\Downloads\demo\target>java -jar demo-0.0.1-SNAPSHOT.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: com/example/demo/DemoApplication has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
My Jre version is 1.8.0_271, java was configure in pom.xml to be 11. jdk version is 14.0.1. I tried to change java version in pom to 8, but then some 11 version related functionality doesn't work. How can this mismatch be resolved?