Unable to process file module-info.class within a Java9 project results in ClassFormatException

一曲冷凌霜 提交于 2019-11-29 12:12:22

I'm not a Tomcat expert, but it looks like the module descriptor is not the most severe problem. The nexted exception contains this block:

Caused by: java.lang.UnsupportedClassVersionError: nullpointer/MyUI$MyUIServlet has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class nullpointer.MyUI$MyUIServlet)

This makes it look like you're running Tomcat on Java 8 (class file version 52), whereas your code is compiled with Java 9 (class file version 53).

Make sure to run Tomcat on Java 9. Furthermore you might want to try an early access build of Tomcat 9, which is required for Java 9 compatibility.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!