-2

I have got an error when running my Java Web App with Tomcat server v10.0.27 through web browser. The web app was compiled with Java 17. However, there was no issue when running the web app on Eclipse IDE with Apache Tomcat v10.0.27 locally.

Below is the error prompted when the web app that was deployed into Tomcat Web Application Manager running.

*``` Exception in thread "main" java.lang.UnsupportedClassVersionError: com/baeldung/MajorMinorApp has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

*
koo_by
  • 1
  • 1

1 Answers1

0

I found that the JVM version of Tomcat Web Application Manager was JRE 1.8 (32bit) which did not support the web app that was compiled with Java 11 (64bit). After reinstalling the latest JRE v10.1, the web app is working well.

koo_by
  • 1
  • 1