idea执行main方法报错Error: A JNI error has occurred, please check your installation and try again

**问题:**idea执行main方法报错Error: A JNI error has occurred, please check your installation and try again

idea执行main方法报错Error: A JNI error has occurred, please check your installation and try again
**解决:**File-Project Structure-Modules
选中项目,选择Dependencies,点击“+”,选择第2个Library,滑到最后,选择Tomcat,点击Add Selected
idea执行main方法报错Error: A JNI error has occurred, please check your installation and try again
回到Dependencies列表。滑到最后,将scope选择为Compile,点击OK
idea执行main方法报错Error: A JNI error has occurred, please check your installation and try again
完成
idea执行main方法报错Error: A JNI error has occurred, please check your installation and try again