I wanted to run my app.jar via terminal with java -jar command, and I have gotten the following error:
Main has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 55.0
which surprised me, because when I was setting everything up, I have downloaded and installed jdk-12.0.1 from java.sun.com.
Also, JAVA_HOME path in /etc/environment is set to the /usr/lib/jvm/openjdk-12.0.1 directory. But when I run java --version, it shows me:
openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)
Can anyone explain why is that so and what should I do to configure everything properly?