0

Good afternoon, when running a server with Ant, this is the error I get.

Exception in thread "main" java.lang.UnsupportedClassVersionError: es/deusto/ingenieria/sd05/easybooking/server/data/Airline has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 56.0

However, when typing javac -version, it says that I'm using the latest Java version (13). I tried to compile it with Java 13, 12 or 11, and none worked. Any ideas on how to fix it?

  • *"this version of the Java Runtime only recognizes class file versions up to 56.0"* Comparing that **56.0** to the list on the linked duplicate, we can see that 56 means **Java 12**. I bet if you run `java -version` it'll say Java 12, not Java 13. Fix you PATH. – Andreas Jan 15 '20 at 19:20
  • @Andreas this is the output: java version "13.0.2" 2020-01-14 Java(TM) SE Runtime Environment (build 13.0.2+8) Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing) –  Jan 15 '20 at 19:30
  • Maybe your Ant script specifies to use a different Java version to run the program. – Andreas Jan 15 '20 at 23:46

0 Answers0