Unsupported major.minor version 52.0 mvn java SE 8
<p>I've compiled code by: <code>export JAVA_HOME=/usr/lib/jvm/java-8-oracle; mvn package</code>. I have:</p>

<pre><code>Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: cs_CZ, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-77-generic", arch: "amd64", family: "unix"
</code></pre>

<p>But after running by <code>java -jar ...</code> I'm getting an error: <code>Unsupported major.minor version 52.0</code>
Does anyone know what I do wrong? I've read than this error appears when compilation was in older java but running is in newer java or vice versa, but I'm using java 8 in both cases.</p>