-1

I am trying to run a jar file on my server but I get this error

Exception in thread "main" java.lang.UnsupportedClassVersionError: Agenda/AgendaApplication 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

what can i do to solve this?

2 Answers2

0

Install and use JDK or JRE with version 11. Here are some guidelines:

http://ubuntuhandbook.org/index.php/2018/11/how-to-install-oracle-java-11-in-ubuntu-18-04-18-10/

https://tecadmin.net/install-openjdk-java-ubuntu/

GiorgosDev
  • 1,757
  • 1
  • 14
  • 16
0

Your system only has Java 8 installed while the application needs at least java 11. You can install a more up to date Java Version:

sudo apt-get install openjdk-11-jre 

after this you should switch your default java environment using the update-java-alternatives command:

sudo update-alternatives --config java

after this you can check the "default jvm" by typing "java --version"

PS: please change the header of this question: "Ubuntu execute jar file" does not specify the problem at all.

eckad158
  • 385
  • 6
  • 19