我正在尝试运行我的 spring 项目,但遇到此错误:
`java.lang.UnsupportedClassVersionError: jakarta/servlet/http/HttpServlet has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0 (unable to load class [jakarta.servlet.http.HttpServlet]) (unable to load class [org.springframework.web.servlet.HttpServletBean]) (unable to load class [org.springframework.web.servlet.FrameworkServlet]) (unable to load class [org.springframework.web.servlet.DispatcherServlet])`
我做了以下改变:
1。转到 Properties -> Java Build Path -> Libraries 并将执行环境编辑为 java se-17
2。 Windows -> 首选项 -> Java -> 编译器 -> 编译器合规级别 -> 17
我在笔记本电脑上安装了java 17版本。
仍然显示相同的错误。我是这方面的新手,我哪里做错了?