title: UnsupportedClassVersionError: has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version (..)up to 52.0
body: <p>I'm trying to launch the jar file I've builded for my Spring Boot project. First I did:</p>
  
  <pre><code>mvn clean package spring-boot:repackage
  </code></pre>
  
  <p>then I've tried to launch the jar file, and I had the following error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.UnsupportedClassVersionError:
    it/sysdata/helios_backend_admin/HeliosAdminBackendApplication 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
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
            at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)</p>
  </blockquote>
  
  <p>I've checked and java version is 11 everywhere (at least from what I saw). This is the pom:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.1.2.RELEASE&lt;/version&gt;
          &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;it.sysdata&lt;/groupId&gt;
      &lt;artifactId&gt;helios_backend_admin&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;helios-admin-backend&lt;/name&gt;
          &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;description&gt;Helios Backend for Dashboard admin&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;11&lt;/java.version&gt;
          &lt;flowable.version&gt;6.4.1&lt;/flowable.version&gt;
          &lt;swagger.version&gt;2.9.2&lt;/swagger.version&gt;
          &lt;jwt.version&gt;0.9.1&lt;/jwt.version&gt;
          &lt;cron4j.version&gt;2.2.5&lt;/cron4j.version&gt;  
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
          &lt;/dependency&gt;  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
              &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- Flowable --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.flowable&lt;/groupId&gt;
              &lt;artifactId&gt;flowable-spring-boot-starter-process&lt;/artifactId&gt;
              &lt;version&gt;${flowable.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.flowable&lt;/groupId&gt;
              &lt;artifactId&gt;flowable-http&lt;/artifactId&gt;
              &lt;version&gt;${flowable.version}&lt;/version&gt;
          &lt;/dependency&gt;  
          &lt;!-- Swagger --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;${swagger.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;${swagger.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- JWT --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.jsonwebtoken&lt;/groupId&gt;
              &lt;artifactId&gt;jjwt&lt;/artifactId&gt;
              &lt;version&gt;${jwt.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-cache&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
              &lt;artifactId&gt;mongo-java-driver&lt;/artifactId&gt;
              &lt;version&gt;3.10.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;it.sauronsoftware.cron4j&lt;/groupId&gt;
              &lt;artifactId&gt;cron4j&lt;/artifactId&gt;
              &lt;version&gt;${cron4j.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;${artifactId}&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                  &lt;source&gt;11&lt;/source&gt;
                  &lt;target&gt;11&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>These are my settings under Project <code>Properties -&gt; Java Compiler -&gt; JDK Compliance</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/V49c5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V49c5.png" alt="enter image description here"></a></p>
  
  <p>Then in <code>Window-&gt; Preferences -&gt; Installed JREs</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/htAM3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/htAM3.png" alt="enter image description here"></a></p>
  
  <p><strong>UPDATE</strong>   </p>
  
  <p>Are these settings ok?
  <a href="https://i.stack.imgur.com/rmmXi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rmmXi.png" alt="enter image description here"></a></p>