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右上角有一个这个,点击
在这里插入图片描述
可以看到这里是9-Module,但这里的JDK是1.8
在这里插入图片描述
因为版本不一致,所以报错,要么把这里改成8,要么把jdk改成1.9,我这里是改成8了
在这里插入图片描述


版权声明:本文为qq_39944028原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。