idea 中main 方法运行错误二

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:13   2614   0

idea在maina方法运行出现错误:

Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"

网上没找到,只有eclipse 的,自我思考

原因:

 <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${servlet.version}</version>
            <scope>provided</scope>
        </dependency>

因为javax.servlet 依赖没引来

解决

把红圈勾上就可以了

转载于:https://www.cnblogs.com/jsbk/p/10053727.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP