Fork me on GitHub

Error:java: Compilation failed: internal java compiler error

IDEA编译报错,jdk设置问题,查看pom中的编译版本(如果是maven项目的话)
image

1、查看项目的jdk(Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings ->Project
image

2、查看模块的jdk(Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings -> Modules -> (需要修改的模块) -> Sources ->
image

3、查看idea中Java编译配置
File ->Setting ->Build,Execution,Deployment -> Compiler -> Java Compiler
image

4、清除 IDEA 缓存 重启 IDEA
File->Invalidate Caches/Restart
image

posted @ 2022-10-20 11:15  秋夜雨巷  阅读(32)  评论(0编辑  收藏  举报