IntelliJ idea error: error: Java does not support release 5

Recommended solution: thanks to another blogger in the comments area, Fu moon, for his solution: https://blog.csdn.net/qq_ 42583206/article/details/108375173   

If the problem is solved in the above way, it can be ignored below.    

—————————————————————————————————————————————————————————————————————————————–

A new Maven project is created in IntelliJ idea. The running error is as follows: error: Java does not support release 5

Jdk9 is used for local operation. When testing Java stream operation, the error should be that the Java version used in the project compilation configuration is wrong. You need to check the Java compilation version configuration used in the project and environment.

Click “file” – & gt; “project structure” in IntelliJ to see if the Java version in “project” and “module” columns is consistent with the local version

 

If not, change to the local java version.

Click “Settings” – & gt; “bulid, execution, deployment” – & gt; “java compiler”, and set the target bytecode version to the local java version. (you can configure project bytecode version to local java version once and for all in default settings)

Default Settings:

After the above two steps have been configured, the above error will not be reported after re running.

 

Once and for all reform through labor:

Thanks to another blogger in the comments area, fumion, for his proposal: https://blog.csdn.net/qq_ 42583206/article/details/108375173

Read More: