解决方法1: file - setting - bulid,Execcution…-java Complier - 最右侧改为你的jdk版本(如:1.8)
如图:
如果 还是出现 :Exception in thread “main” Process finished with exit code 1
解决方法2:file - project structure - modules - 右侧Dependencies - 将servlet-api 后面改为compile
如图
再次运行ok
idea运行main出现Exception in thread "main" Process finished with exit code 1
最新推荐文章于 2025-05-18 19:18:35 发布