Information:java: Errors occurred while compiling module

Information:java: Errors occurred while compiling module ‘lucene-first’
Information:javac 1.8.0_162 was used to compile java sources
Information:Module “lucene-first” was fully rebuilt due to project configuration/dependencies changes
Information:2020/5/21 22:10 - Compilation completed with 1 error and 0 warnings in 2s 421ms
Error:java: 无效的源发行版: 1.9

出现这种问题解决方法:
第一步,在IDEA右上角有一个这个,点击
Information:java: Errors occurred while compiling module_第1张图片
可以看到这里是9-Module,但这里的JDK是1.8
Information:java: Errors occurred while compiling module_第2张图片
因为版本不一致,所以报错,要么把这里改成8,要么把jdk改成1.9,我这里是改成8了
Information:java: Errors occurred while compiling module_第3张图片

你可能感兴趣的:(java,idea)